[解决] selenium.common.exceptions.SessionNotCreatedException: Message: session not created

老丁

记录下,很久不用selenium调用chrome,会因为Chrome driver驱动版本不对,导致运行selenium报错,一般报错信息如下:

selenium.common.exceptions.SessionNotCreatedException: Message: session not created: 
This version of ChromeDriver only supports Chrome version {你之前chrome版本} Current browser version is {你现在chrome的版本}


解决方法是安装和自己电脑chrome浏览器版本相同的Chrome driver。步骤如下:

1,查看chrome浏览器的版本。

image.png

2,下载对应版本的Chrome driver。国内镜像地址:https://registry.npmmirror.com/binary.html?path=chromedriver/

3,解压后,将 chromedriver.exe 放在 自己电脑python安装目录下,我的是(C:\Users\Administrator\AppData\Local\Programs\Python\Python38)


试了下,ok,没问题了。

发表评论

快捷回复: 表情:
AddoilApplauseBadlaughBombCoffeeFabulousFacepalmFecesFrownHeyhaInsidiousKeepFightingNoProbPigHeadShockedSinistersmileSlapSocialSweatTolaughWatermelonWittyWowYeahYellowdog
评论列表 (暂无评论,1267人围观)

还没有评论,来说两句吧...