解决selenium.common.exceptions.WebDriverException: Message: 'chromedriver' executable needs to be in PATH. Please see https://sites.google.com/a/chromium.org/chromedriver/home

时间:2021-07-10 17:26:02

解决方案:

1.查看浏览器当前版本:chrome://version/。

2.到https://sites.google.com/a/chromium.org/chromedriver/downloads下载对应的浏览器驱动。

3.将驱动放在任意位置。

4.browser = webdriver.Chrome(r"驱动的路径")

解决selenium.common.exceptions.WebDriverException: Message: 'chromedriver' executable needs to be in PATH. Please see https://sites.google.com/a/chromium.org/chromedriver/home