python selenium webdriver.Chrome()调取报错:selenium common exceptions Session Not Created Exception

使用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 下载
![在这里插入图片描述](https://img-blog.csdnimg.cn/d9262dda94a94d7484a1ec7cd496d7c7.png?x-oss-process=image/watermark,type_d3F5LXplbmhlaQ,shadow_50,text_Q1NETiBA5YyX5paX6Iqv,size_20,color_FFFFFF,t_70,g_se,x_16

3、将下载的浏览器驱动放置到python文件目录下,替换原来的
在这里插入图片描述
重启程序,浏览器调取成功!

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值