当前位置:网站首页>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)
边栏推荐
- 工具 - markdown编辑器常用方法
- 事务_基本演示和事务_默认自动提交&手动提交
- Why is there no unified quotation for third-party testing fees of software products?
- Understand the evolution of redis architecture in one article
- 一些二进制位操作
- STM32 can -- can ID filter analysis
- Kubernetes CNI 分类/运行机制
- 微信小程序实现音乐搜索页面
- Finally, someone finished all the dynamic planning, linked list, binary tree and string required for the interview
- internship:其他配置类的编写
猜你喜欢

Understand the evolution of redis architecture in one article

Nokia's patent business was hit for the first time, and Chinese enterprises are not so easy to knead

JUC(JMM、Volatile)

移动端使用vantUI的list组件,多个tab项来回切换时,列表加载多次导致数据无法正常展示

What is tor? What is the use of tor browser update?

适配验证新职业来了!华云数据参与国家《信息系统适配验证师国家职业技能标准》编制

Kotlin的基础用法

修改frameworks资源文件如何单编

ADB command (install APK package format: ADB install APK address package name on the computer)

关于 CMS 垃圾回收器,你真的懂了吗?
随机推荐
NEFU119 组合素数【算术基本定理】
Hdu3117 Fibonacci numbers [mathematics]
LeetCode 面试题 17.21. 直方图的水量 双指针,单调栈/hard
Lesson 3: SPFA seeking the shortest path
《剑指Offer》两个链表的第一个公共结点
光电隔离电路设计方案(六款基于光耦、AD210AN的光电隔离电路图)
Principle of MOS tube to prevent reverse connection of power supply
Visual system design example (Halcon WinForm) -10. PLC communication
AssetBundle如何打包
网络设备硬核技术内幕 路由器篇 9 CISCO ASR9900拆解 (二)
LeetCode 191. Number of 1 Bits(位1的个数) 位运算/easy
适配验证新职业来了!华云数据参与国家《信息系统适配验证师国家职业技能标准》编制
仅做两项修改,苹果就让StyleGANv2获得了3D生成能力
STM32学习之CAN控制器简介
反射
What is the execution method of the stand-alone parallel query of PostgreSQL?
网络设备硬核技术内幕 路由器篇 13 从鹿由器到路由器(上)
Internship: compilation of other configuration classes
《剑指Offer》数组中的逆序对
Kubernetes CNI 分类/运行机制