下載與當前Chrome對應的chromedriver.exe
瀏覽器查看版本號,對應下載驅動
1、chromedriver驅動包下載地址:http://chromedriver.storage.googleapis.com/index.html
2、將下載的驅動 chromedriver 放到 PYTHON 安裝目錄 下(PS:非瀏覽器目錄下哈)
3、啟動瀏覽器 driver = webdriver.Chrome()
超攢的博客
python selenium自動化之chrome與chromedriver版本兼容問題
https://www.cnblogs.com/new-june/p/14249974.html
報錯:
File "C:\Users\HUAWEI\AppData\Roaming\Python\Python38\site-packages\selenium\webdriver\common\service.py", line 81, in start
raise WebDriverException(
selenium.common.exceptions.WebDriverException: Message: 'chromedriver' executable needs to be in PATH. Please see https://sites.google.com/a/chromium.org/chromedriver/home
解決方法:
把下載好的驅動 chromedriver 放到PYTHON 安裝目錄 下(非瀏覽器目錄下) ,正常了
明細可以參考以下大神網址
https://www.cnblogs.com/LLSHPower/p/12160506.html
http://element-ui.cn/news/show-17251.aspx