如何解决错误【selenium.common.exceptions.SessionNotCreatedException】
如何解决错误【selenium.common.exceptions.SessionNotCreatedException】
【问题起因】
2018年12月26日晚,启动我的pycharm准备学习selenium相关的知识,结果报错了:selenium.common.exceptions.SessionNotCreatedException: Message: Unable to find a matching set of capabilities

开始我很疑惑,因为早一段时间,火狐浏览器可以通过selenium来启动,然后又试了几次,还是报同样的错。然后只好找百度爸爸帮忙了......
【问题原因】
firefox浏览器版本和浏览器驱动版本不匹配
【解决方法】
将火狐浏览器的版本降低到 v50.0,重新下载了浏览器驱动——geckodriver V0.15


【解决问题】
更新浏览器和驱动后,能正常通过selenium打开网站。

【问题反思】
为什么selenium突然不能操作浏览器?初步分析是火狐浏览器自动升级更新了版本,导致驱动版本和浏览器版本不匹配。那如何防止火狐浏览器自动更新?
1.在浏览器的右上角有一个三道杠的图标,我们单击一下弹出小窗口,点击“选项”按钮进入新页面

2.切换到“高级”选项页,点击“更新”选项,会出现三个选项分别是自动更新,检查更新和不检查更新,就是这个三个选项来控制我们的火狐浏览器是否自动更新的。选择“不检查更新”即可防止浏览器自动更新。

如何解决错误【selenium.common.exceptions.SessionNotCreatedException】的更多相关文章
- 解决错误【selenium.common.exceptions.SessionNotCreatedException】
以前能用,突然不能用了,是浏览器版本可能升级了,与原来的weddriver驱动版本不符合 解决办法:1.更新浏览器驱动, 2.降低浏览器版本
- 错误:selenium.common.exceptions.SessionNotCreatedException: Message: Unable to find a matching set of capabilities
错误再现 原因:firefox浏览器版本和浏览器驱动版本不匹配 解决办法:卸载高版本浏览器,安装低版本浏览器
- “selenium.common.exceptions.SessionNotCreatedException: Message: Unable to find a matching set of capabilities“解决办法
问题: 原因:firefox浏览器版本和浏览器驱动版本不匹配 解决办法:卸载高版本浏览器,安装低版本浏览器 下载地址:http://ftp.mozilla.org/pub/firefox/releas ...
- python 安装selenium首次运行错误selenium.common.exceptions.WebDriverException: Message: 'chromedriver' executable needs to be in PATH
问题原因: 没有安装相关的支撑driver https://npm.taobao.org/mirrors/chromedriver/ 下载对应的driver 放置到python路径下
- 解决selenium.common.exceptions.WebDriverException: Message: 'chromedriver' executable needs to be in P
转载 解决selenium.common.exceptions.WebDriverException: Message: 'chromedriver' executable needs to be i ...
- 解决selenium.common.exceptions.InvalidArgumentException: Message: invalid argument: invalid 'expiry'
解决selenium.common.exceptions.InvalidArgumentException: Message: invalid argument: invalid 'expiry' ...
- selenium.common.exceptions.WebDriverException: Message: 'geckodriver' executable needs to be in PATH. 错误处理方法
首次使用selenium webdriver,webdriver.Firefox() 报错selenium.common.exceptions.WebDriverException: Message: ...
- python+selenium,打开浏览器时报selenium.common.exceptions.WebDriverException: Message: 'chromedriver' executable needs to be in PATH
有一年多没写web自动化了,今天搭建环境的时候报了一个常见错误,但是处理过程有点闹心,报错就是常见的找不到驱动<selenium.common.exceptions.WebDriverExcep ...
- robotframework执行用例时,报错selenium.common.exceptions.WebDriverException: Message: unknown error: cannot get automation extension from unknown error: page could not be found: chrome-extension://aapnijgdinl
在用robotframework编写移动端测试用例(用chrome浏览器模拟手机浏览器),执行用例时, 报错selenium.common.exceptions.WebDriverException: ...
随机推荐
- DedeAMPZ配置php的curl扩展
DedeAMPZ配置php的curl扩展 curl是一个利用URL语法在命令行方式下工作的文件传输工具.它支持很多协议:FTP, FTPS, HTTP, HTTPS, GOPHER, TELNET, ...
- mxnet 豆瓣镜像源安装
mxnet安装比较简单,这里直接通过豆瓣镜像源用pip安装 pip install -i https://pypi.doubanio.com/simple/ mxnet-cu100 # 进入ipyth ...
- Codeforces Round #581 (Div. 2) C. Anna, Svyatoslav and Maps (Floyd 算法,最短路)
C. Anna, Svyatoslav and Maps time limit per test2 seconds memory limit per test256 megabytes inputst ...
- 【AGC006 C】Rabbit Exercise
题意 有 \(n\) 只兔子在数轴上,第 \(i\) 只兔子的初始坐标为整数 \(x_i\). 现在这些兔子会按照下面的规则做体操.每一轮体操都由 \(m\) 次跳跃组成:在第 \(j\) 次跳跃时, ...
- js 字符串格式化为时间格式
首先介绍一下我遇到的坑,找了几个关于字符串转时间的,他们都可以就我用的时候不行. 我的原因,我的字符串是MYSQL拿出来的不是标准的时间格式,是不会转成功的. 解决思路:先将字符串转为标准时间格式的字 ...
- mybatis-plus generator使用
pom配置 <dependency> <groupId>com.baomidou</groupId> <artifactId>mybatis-plus- ...
- html中表单提交
表单提交代码 1.源代码分析 <!DOCTYPE html> <html lang="en"> <head> <meta charset= ...
- centos7时区同步(时间24小时格式显示)
我们在服务器安装linux系统时,有时会因服务器时间或者时区不正确导致程序出现错误. 首先输入date命令查看当前的时间和时区.要注意CST EDT 等时区的区别 介绍一种与时间服务器上时间同步的 ...
- Idea 一个窗口打开多个项目
1.[new] > [Module form Existing Sources] 2.选择导入的项目
- 计算机网络(六),UDP报文段详解
目录 1.UDP作用 2.UDP报文段详解 六.UDP报文段详解 1.UDP作用 (1)面向非连接 (2)不维护连接状态,支持同时向多个客户端传送相同的消息 (3)报文段报头只有8个字节,格外开销较小 ...