使用Python selenium调取Chrome 时报错:
错误提示:
selenium common exceptions Session Not Created Exception Message session not created
This version of ChromeDriver only supports Chrome version 86
Current browser version is 96.0.4664.110 with binary path C:\Users\Administrator\AppData\Local\Google\Chrome\Application\chrome.exe
说明当前的chrome浏览器驱动只支持86版本,需要下载当前浏览器对应的96.0.4664版本的驱动
解决方案:
1、检查自己当前的chrome版本:
2、到chromedriver 网站,选择与自己当前chrome浏览器版本相对应的chromedriver
http://chromedriver.storage.googleapis.com/index.html
或:http://npm.taobao.org/mirrors/chromedriver/
关于96版本的有3个,没有版本 96.0.4664.110
定位到相近的96.0.4664.45 即可
http://chromedriver.storage.googleapis.com/index.html?path=96.0.4664.45/
windows 选择:chromedriver_win32.zip 下载
3、将下载的浏览器驱动放置到python文件目录下,替换原来的
重启程序,浏览器调取成功!