python 自动化 chrome版本和chromedriver.exe不匹配
报错如下:
selenium.common.exceptions.SessionNotCreatedException: Message: session not created: This version of ChromeDriver only supports Chrome version 96
Current browser version is 104.0.5112.81 with binary path C:\Program Files (x86)\Google\Chrome\Application\chrome.exe
需要修改的是python目录下的chrome.exe!
- 先找到chrome的版本
在下方地址中:
http://chromedriver.storage.googleapis.com/index.html
找到版本号接近的点进去
2. 下载下图的内容
3. 解压到文件夹
4. 把解压得到的chromedriver.exe替换掉原来的chrome就行了。
替换完成就结束了…