当前位置:网站首页>Selenium 报错:session not created: This version of ChromeDriver only supports Chrome version 81
Selenium 报错:session not created: This version of ChromeDriver only supports Chrome version 81
2022-07-27 14:18:00 【Honyelchak】
问题
最近需要用selenium完成一个自动化测试,出现了以下错误:
selenium.common.exceptions.SessionNotCreatedException: Message: session not created: This version of ChromeDriver only supports Chrome version 81
应该是chromedriver与chrome版本不匹配造成的。
解决方案
从浏览器中查看chrome的版本号
![[外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-D6VplHzW-1616388842829)(爬虫.assets/image-20210322123515853.png)]](/img/be/d695daa1fce6fa7e49381ff56df194.png)
从
http://npm.taobao.org/mirrors/chromedriver上下载对应版本的驱动将
chromedriver.exe解压出来,可以将文件解压到python的安装目录,也可以解压到任意地方。当然程序中允许自定义
chromedriver.exe的路径chrome_driver = r"G:\Anaconda3\Lib\site-packages\selenium\webdriver\chrome\chromedriver" driver = webdriver.Chrome(chrome_options=chrome_options, executable_path=chrome_driver)
边栏推荐
- DIY ultra detailed tutorial on making oscilloscope: (1) I'm not trying to make an oscilloscope
- Graphical SQL is too vivid
- 事务_基本演示和事务_默认自动提交&手动提交
- Getting started with DirectX
- cap理论和base理论
- USB接口电磁兼容(EMC)解决方案
- Introduction of the connecting circuit between ad7606 and stm32
- DXGI acquisition process
- STM32F103C8T6在Arduino框架下驱动ssd1306 0.96“ IIC OLED显示
- 网络设备硬核技术内幕 路由器篇 9 CISCO ASR9900拆解 (二)
猜你喜欢

adb命令 (安装apk包格式:adb install 电脑上apk地址包名)

Why is there no unified quotation for third-party testing fees of software products?

Unity性能优化------渲染优化(GPU)之Occlusion culling(遮挡剔除)

什么是Tor?Tor浏览器更新有什么用?

光电隔离电路设计方案(六款基于光耦、AD210AN的光电隔离电路图)

修改frameworks资源文件如何单编

LeetCode 783. 二叉搜索树节点最小距离 树/easy

Digital storage oscilloscope based on FIFO idt7202-12

LeetCode 240. 搜索二维矩阵 II medium

reflex
随机推荐
NEFU119 组合素数【算术基本定理】
reflex
Kubernetes CNI 分类/运行机制
USB接口电磁兼容(EMC)解决方案
Unity最简洁的对象池实现
Stm32f103c8t6 drives sh1106 1.3 "IIC OLED display under Arduino frame
LeetCode 1143. 最长公共子序列 动态规划/medium
网络设备硬核技术内幕 路由器篇 11 CISCO ASR9900拆解 (五)
Nefu117 number of prime numbers [prime number theorem]
JUC(JMM、Volatile)
《剑指Offer》数组中的逆序对
网络设备硬核技术内幕 路由器篇 CISCO ASR9900拆解 (一)
LeetCode 90. 子集 II 回溯/medium
仪表放大器和运算放大器优缺点对比
SkyWalking分布式系统应用程序性能监控工具-中
Design scheme of digital oscilloscope based on stm32
LeetCode 456. 132模式 单调栈/medium
LeetCode 781. 森林中的兔子 哈希表/数学问题 medium
数据仓库项目从来不是技术项目
LeetCode 783. 二叉搜索树节点最小距离 树/easy