【发布时间】:2021-11-22 18:56:26
【问题描述】:
如何描述MAC上chrome的路径? 我使用了这段代码:
import time
from selenium import webdriver
driver = webdriver.Chrome('../chromedriver') # Optional argument, if not specified will search path.
driver.get('http://www.google.com/');
time.sleep(5) # Let the user actually see something!
search_box = driver.find_element_by_name('q')
search_box.send_keys('ChromeDriver')
search_box.submit()
time.sleep(5) # Let the user actually see something!
driver.quit()```
I got error: **DeprecationWarning: executable_path has been deprecated, please pass in a Service object
driver = webdriver.Chrome('../chromedriver') # Optional argument, if not specified will search path.**
【问题讨论】:
标签: python google-chrome