如何解决错误【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】的更多相关文章

  1. 解决错误【selenium.common.exceptions.SessionNotCreatedException】

    以前能用,突然不能用了,是浏览器版本可能升级了,与原来的weddriver驱动版本不符合 解决办法:1.更新浏览器驱动, 2.降低浏览器版本

  2. 错误:selenium.common.exceptions.SessionNotCreatedException: Message: Unable to find a matching set of capabilities

    错误再现 原因:firefox浏览器版本和浏览器驱动版本不匹配 解决办法:卸载高版本浏览器,安装低版本浏览器

  3. “selenium.common.exceptions.SessionNotCreatedException: Message: Unable to find a matching set of capabilities“解决办法

    问题: 原因:firefox浏览器版本和浏览器驱动版本不匹配 解决办法:卸载高版本浏览器,安装低版本浏览器 下载地址:http://ftp.mozilla.org/pub/firefox/releas ...

  4. python 安装selenium首次运行错误selenium.common.exceptions.WebDriverException: Message: 'chromedriver' executable needs to be in PATH

    问题原因: 没有安装相关的支撑driver https://npm.taobao.org/mirrors/chromedriver/ 下载对应的driver 放置到python路径下

  5. 解决selenium.common.exceptions.WebDriverException: Message: 'chromedriver' executable needs to be in P

    转载 解决selenium.common.exceptions.WebDriverException: Message: 'chromedriver' executable needs to be i ...

  6. 解决selenium.common.exceptions.InvalidArgumentException: Message: invalid argument: invalid 'expiry'

    解决selenium.common.exceptions.InvalidArgumentException: Message: invalid argument: invalid 'expiry'   ...

  7. selenium.common.exceptions.WebDriverException: Message: 'geckodriver' executable needs to be in PATH. 错误处理方法

    首次使用selenium webdriver,webdriver.Firefox() 报错selenium.common.exceptions.WebDriverException: Message: ...

  8. python+selenium,打开浏览器时报selenium.common.exceptions.WebDriverException: Message: 'chromedriver' executable needs to be in PATH

    有一年多没写web自动化了,今天搭建环境的时候报了一个常见错误,但是处理过程有点闹心,报错就是常见的找不到驱动<selenium.common.exceptions.WebDriverExcep ...

  9. 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: ...

随机推荐

  1. (转)FPS游戏服务器设计的问题

    FPS游戏服务器设计的问题出处:http://www.byteedu.com/thread-20-1-1.html一.追溯 去gameloft笔试,有一个题目是说: 叫你去设计一个FPS(第一人称射击 ...

  2. 织梦DEDECMS 5.7文章列表第一页dedefield.content

    功能介绍:有很多DEDEcms使用者,在二级文章列表中加入了{dede:field.content/},但在二级栏目中的每一页列表中都存在内容:使用该功能可以只在第一页显示. 注意:只针对最新dede ...

  3. Mac安装PHP(Homebrew/php弃用、其他第三方tap也已经弃用或者迁移后的安装配置方案)

    一.前言 看网上很多资料,大多数都是 mac安装php,只需要: brew tap homebrew/php brew install phpXX 安装php扩展只需要: brew install p ...

  4. html 中 图片和文字一行 垂直居中对齐

    效果:      代码:<div><img src='img/point_icon.png' width='35px' height='35px' style='float: lef ...

  5. RE 逆向工程初学者指南:方法和工具

    简评: RE 两种分析,静态.动态.好好分析静态因为能够解决 70 % 的问题.介绍了一些工具和方法.Enjoy yourself. 最近几天,我决定试水逆向工程,即使在计算机和编程相关领域有一定的基 ...

  6. dlopen 加载so库

    #include <stdio.h> #include <dlfcn.h> int main(int argc, char **argv) { void *handle; do ...

  7. redis缓存穿透-解决方案

    上面的解决方案个人觉得时有误的,因为就算缓存了value的null值,后面的接口请求还是会判断走数据库,所以看解决方案二 解决方案二: https://blog.csdn.net/muyi_amen/ ...

  8. 如何在某些情况下禁止提交Select下拉框中的默认值或者第一个值(默认选中的就是第一个值啦……)

    群里有个帅哥问了这么个问题,他的下拉框刚进页面时是隐藏起来的,但是是有值的,为啥呢?因为下拉框默认选中了第一个值呗,,, 所以提交数据的时候就尴尬啦,明明没有选,但是还是有值滴.怎么办呢? 一开始看到 ...

  9. 本地安装sass出错问题解析

    2016年3月23日个人博客文章--迁移到segmentfault 安装sass ruby安装因为sass依赖于ruby环境,所以装sass之前先确认装了ruby.先导官网下载个ruby 在安装的时候 ...

  10. 依赖jquery的select皮肤2

    这个下拉菜单存在于body中,不会受select父级overflow的影响,同样依赖于jquery. 缺陷是如果select上的样式不是定义在class上的,不能完全获取select上的样式. 不过, ...