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. solr学习笔记-增加mmesg4J中文分词

    solr版本6.1.centos6.7.mmesg4j版本2.30 solr安装目录:/usr/local/solr-6.1.0 1.下载mmesg4j包: 地址:https://github.com ...

  2. nginx配置:静态访问txt文件

    有一个A网站,访问的话会重定向跳转到B网站上,在A网站的nginx配置文件中配置的有如下: location / { rewrite ^/(.*) http://B/$1 redirect; } 现在 ...

  3. Mysql学习(四)之通过homebrew安装mysql后,为什么在系统偏好设置里没有mysql

    原因 用brew install packagename是用来安装命令行工具的,一般不可能影响到图形界面. mysql官方文档是通过dmg文件安装的: The MySQL Installation P ...

  4. leetcode 1051. Height Checker

    Students are asked to stand in non-decreasing order of heights for an annual photo. Return the minim ...

  5. 108、如何使用 Secret? (Swarm15)

    参考https://www.cnblogs.com/CloudMan6/p/8068057.html   我们经常要想容器传递敏感信息,最常见的就是密码.比如:   docker run -e MYS ...

  6. luogu P4482 [BJWC2018]Border 的四种求法

    luogu 对于每个询问从大到小枚举长度,哈希判断是否合法,AC 假的(指数据) 考虑发掘border的限制条件,如果一个border的前缀部分的末尾位置位置\(x(l\le x < r)\)满 ...

  7. elasticsearch设置执行脚本并添加开机启动 (转)

    elasticsearch设置执行脚本并添加开机启动 在/etc/init.d目录下新建文件elasticsearch #!/bin/sh #chkconfig: 2345 80 05 #descri ...

  8. python中re模块

    1.定义 正则表达式是一个特殊的字符序列,能方便的检查一个字符串是否与某种模式匹配.re模块使得python拥有全部的正则表达式功能. 2.用途 通过使用正则表达式,可以:测试字符串内的模式.—— 例 ...

  9. linux 软件安装目录详解

    我一般会在/opt目录下创建 一个software目录,用来存放我们从官网下载的软件格式是.tar.gz文件,或者通过 wget+地址下载的.tar.gz文件 执行解压缩命令,这里以nginx举例 t ...

  10. deep_learning_Function_tf.control_dependencies([])

    tf.control_dependencies([])函数含义及使用 2019.02.23 14:01:14字数 60阅读 420 tf.control_dependencies([controls_ ...