selenium.common.exceptions.WebDriverException: Message: ‘chromedriver‘ executable needs to be in PAT

好久没用selenium,最近突然用,就报了这个错。

我正纳闷不是说​114.0.5735.90​版本之后的谷歌都不需要装chromedriver了吗?怎么我120多的版本还要我搞环境变量。找来找去,最后官网给出的办法是更新selenium即可

pip install --upgrade selenium

顺便附上114.0.5735.90之前的chromedriver驱动

chromedriver.storage.googleapis.com/index.htmlicon-default.png?t=N7T8https://chromedriver.storage.googleapis.com/index.html

from selenium import webdriver
driver = webdriver.Chrome()
driver.get('https://www.baidu.com')

你可能感兴趣的:(selenium,测试工具)