티스토리 뷰

 

'Selenium webdriver 로 웹페이지 띄우기' 를 진행하며 chrome webdriver를 실행했는데, 아래와 같은 warning이 뜨는 경우가 있습니다.

 

DeprecationWarning: executable_path has been deprecated, please pass in a Service object 

 

이런 경우 service 키워드를 사용하면 됩니다.

 

from selenium import webdriver
from selenium.webdriver.chrome.service import Service
from webdriver_manager.chrome import ChromeDriverManager

chrome_options = webdriver.ChromeOptions()
driver = webdriver.Chrome(service=Service(ChromeDriverManager().install()), options=chrome_options)
driver.get(url='https://www.google.com/')

driver.quit()

 

아래는 실행 결과후 console 창에 

 

참고 : 

댓글
공지사항
최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday
링크
«   2024/05   »
1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31
글 보관함