raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.SessionNotCreatedException: Message: Unable to find a
 matching set of capabilities

selenium3.0之后的版本的就不支持直接打开火狐浏览器,启动火狐浏览器报错,如下图,要想运行就需要我们单独装上驱动。

3.0之前的版本,是可以直接打开火狐浏览器的。火狐版本不兼容,需下载对应的驱动器,

IE驱动是可以的

#coding=utf-8
from selenium import webdriver

import time
driver=webdriver.Ie(executable_path="C:\\Program Files\\Mozilla Firefox\\IEDriverServer")
time.sleep(3)
driver.get("https://baidu.com.cn")
driver.quit()

解决办法:

1、首先下载最新版的火狐浏览器

2、下载合适的驱动,对应自己系统,下载地址https://github.com/mozilla/geckodriver/releases,解压文件把下载的驱动文件放在自己的驱动目录下边,我放在单独一个d盘的D:\driver目录下.

重新运行脚本即可。

各个浏览器驱动与浏览器版本的映射关系见:http://blog.csdn.net/huilan_same/article/details/52615123

注火狐浏览器的版本与驱动版本映射关系没有

webdriver驱动火狐浏览器报错:Unable to find a matching set of capabilities的更多相关文章

  1. python2.7运行selenium webdriver api报错Unable to find a matching set of capabilities

    在火狐浏览器33版本,python2.7运行selenium webdriver api报错:SessionNotCreatedException: Message: Unable to find a ...

  2. 火狐浏览器报错“support.mozilla.org

    火狐浏览器有时候再打开新网页会报此错“support.mozilla.org 有时候火狐浏览器会出现如下状况 解决方法 在地址栏键入”about:config” 点击“我了解此风险” 在下方任意位置右 ...

  3. [转]bootstrap-datetimepicker 火狐浏览器报错

    本文转自:https://segmentfault.com/a/1190000008457568 使用bootstrap-datetimepicker日期选择插件时发现在火狐浏览器下报错: 未压缩版报 ...

  4. java selenium启动火狐浏览器报错:Cannot find firefox binary in PATH. Make sure firefox is installed. OS appears to be: VISTA Build info: version: '3.8.1', revision: '6e95a6684b', time: '2017-12-01T19:05:14.666Z

    Cannot find firefox binary in PATH. Make sure firefox is installed. OS appears to be: VISTA Build in ...

  5. 安装火狐浏览器报错找不到VCRUNTIME140_1.DLL

    产生原因参考及下载地址:https://cn.dll-files.com/vcruntime140_1.dll.html vcruntime140_1.dll 相关的错误可能源于多种不同原因.比如,错 ...

  6. python无法启动火狐浏览器且报错“selenium.common.exceptions.WebDriverException: Message: Unable to find a matching set of capabilities”

    安装了python2,使用pip安装了selenium,但是在使用时,报了“selenium.common.exceptions.WebDriverException: Message: 'gecko ...

  7. 更新浏览器,导致编写脚本报错Message: Unable to find a matching set of capabilities

    卸载更新浏览器后,所编写的脚本无法运行,报如下的错误:selenium.common.exceptions.WebDriverException: Message: Unable to find a ...

  8. python脚本中selenium启动浏览器报错os.path.basename(self.path), self.start_error_message) selenium.common.excep

    在python脚本中,使用selenium启动浏览器报错,原因是未安装浏览器驱动,报错内容如下: # -*- coding:utf-8 -*-from selenium import webdrive ...

  9. Windows 7上打开IE浏览器报错:无法启动此程序,因为计算机中丢失api-ms-win-core-path-|1-1-0.dll。尝试重新安装该程序以解决此问题。

    Windows 7上打开IE浏览器报错: 1. 重新安装IE11也没有解决该问题 2. 在其他Win7电脑也搜索不到该文件,但是能使用IE浏览器. 3. 从网上找了一个dll文件,注册时提示如下图

随机推荐

  1. 三维数点的CDQ分治板子

    int n, k, tot; struct _ {int x,r,f;} a[N]; struct __ { int type; ll x,y; bool operator < (const _ ...

  2. 前端 使用localStorage 和 Cookie相结合的方式跨页面传递参数

    A页面 html代码: 姓名:<input type="text" id="name1"> 年龄:<input type="text ...

  3. Dubbo架构

    原文链接http://dubbo.apache.org 架构图 节点角色说明 节点 角色说明 Provider 暴露服务的服务提供方 Consumer 调用远程服务的服务消费方 Registry 服务 ...

  4. ubuntu 安装vim报错

    问题:ubuntu18.04默认没有安装vim,使用 sudo apt install 提示 错误信息: 下列信息可能会对解决问题有所帮助: 下列软件包有未满足的依赖关系: vim : 依赖: vim ...

  5. 使用fiddler进程弱网测试

    使用fiddler手机需调整所连网络代理模式为手动,主机名与端口改为与电脑相同 打开Fiddler,Rules(规则)->Performance(性能)->勾选 Simulate Mode ...

  6. 关于select的取值

    这篇博客,主要是记录我我所犯的错误,或者自己的写法不规范导致了错误,大家可以引以引以为鉴. 我要获取select当前的值,在IE9上我可以直接写document.getElementById(&quo ...

  7. dcoker_ubuntu中安装python2.7

    1.apt-get update 2.apt-get install python2.7 或 1.sudo apt-get update 2.sudo apt-get install python2. ...

  8. Detecting Unstable Periodic Orbits in Chaotic Experimental Data (解析)

    原文链接:https://journals.aps.org/prl/abstract/10.1103/PhysRevLett.76.4705 发表在:PRL 1996 ---------------- ...

  9. Python版本号比较函数 LooseVersion 和StrictVersion

  10. eclipse springboot 官网demo启动 SpringApplication类找不到

    网上有很多类似的,我这种情况是:maven的问题,,, 我自己下载了maven并集成到了eclipse上,导致java.lang.NoClassDefFoundError: org/springfra ...