python无法启动火狐浏览器且报错“selenium.common.exceptions.WebDriverException: Message: Unable to find a matching set of capabilities”
安装了python2,使用pip安装了selenium,但是在使用时,报了“selenium.common.exceptions.WebDriverException: Message: 'geckodriver' executable needs to be in PATH.”
网上查了一下解决办法,此处做下记录:
原因:使用pip安装selenium,默认安装的是最新版本的selenium,使用pip list查了一下我的selenium版本,是3.5.0的,firefox版本,是47.0.2的,selenium 3.x开始,webdriver/firefox/webdriver.py的__init__中,executable_path="geckodriver";而2.x是executable_path="wires"
方法一:可以卸载现有的selenium,安装指定的2.X版本的selenium,这个办法没有试,因为就是本着selenium3来的,不打算降版本;
方法二:下载geckodriver.exe
- 下载地址:https://github.com/mozilla/geckodriver/releases,根据自己的电脑,下载的win64位的;
- 在firefox的安装目录下,解压geckodriver,然后将该路径添加到path环境变量下,不报这个错了;
- 但是,报了一个新的错“selenium.common.exceptions.WebDriverException: Message: Unable to find a matching set of capabilities”;
- 继续网上查,原因是,我下载的geckodriver是V0.16.1版本的,这个版本和selenium3.4.2不兼容,需要使用deckdriverV0.15的版本;
- 重新下载了deckodriverV0.15的版本,ok了,不报这个错了,但是,又报了一个新的错“selenium.common.exceptions.WebDriverException: Message: Unsupported Marionette protocol version 2, required 3;
- 继续往上查原因,说是firefox版本太低了,需要升级到最新版,ok,更新firefox,问题解决。\
- 火狐浏览器的安装文件.exe也添加到path环境变量中,避免出现一些不不要的错误
python无法启动火狐浏览器且报错“selenium.common.exceptions.WebDriverException: Message: Unable to find a matching set of capabilities”的更多相关文章
- 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: ...
- windows下使用selenium报错selenium.common.exceptions.WebDriverException: Message: 'geckodriver' executable needs to be in PATH
问题 :执行程序代码报错: WebDriverException:Message:'geckodriver'executable needs to be in Path 或者 selenium.com ...
- selenium使用报错“selenium.common.exceptions.WebDriverException: Message: 'geckodriver' executable needs to be in PATH.”
安装了python3,使用pip安装了selenium,但是在使用时,报了“selenium.common.exceptions.WebDriverException: Message: 'gecko ...
- 【Selenium】【BugList6】调用IE,未启用保护模式,报:selenium.common.exceptions.WebDriverException: Message: Unexpected error launching Internet Explorer. Protected Mode settings are not the same for all zones.
>>> driver = webdriver.Ie() 解决方法: 1.打开Ie浏览器 , 工具 ->Internet选项 ->安全 2.去掉4个区域的安全保护模式
- 【Python + Selenium】初次用IE浏览器之报错:selenium.common.exceptions.WebDriverException: Message: Unexpected error launching Internet Explorer. Protected Mode settings are not the same for all zones.
初次用IE浏览器运行自动化程序时,报错:selenium.common.exceptions.WebDriverException: Message: Unexpected error launchi ...
- python+selenium,打开浏览器时报selenium.common.exceptions.WebDriverException: Message: 'chromedriver' executable needs to be in PATH
有一年多没写web自动化了,今天搭建环境的时候报了一个常见错误,但是处理过程有点闹心,报错就是常见的找不到驱动<selenium.common.exceptions.WebDriverExcep ...
- Selenium click不生效 报错selenium.common.exceptions.InvalidArgumentException
记录在使用selenium过程中踩的坑------ 在使用selenium时,用click点击网站弹出的文件上传框的"上传文件"按钮不生效,报错selenium.common.ex ...
- appium常见问题03_appium脚本报错selenium.common.exceptions.WebDriverException
运行appium脚本时报错selenium.common.exceptions.WebDriverException...,如下截图: 该报错说明appium和app的内置chrome版本不一致 [解 ...
- python+selenium遇到元素定位不到的问题,顺便记录一下自己这次的错误(报错selenium.common.exceptions.NoSuchElementException)
今天在写selenium一个发送邮件脚本时,遇到一些没有找到页面元素的错误.经过自己反复调试,找原因百度,终于解决了.简单总结一下吧,原因有以下几点: 一:Frame控件嵌套,.Frame/Ifram ...
随机推荐
- DRF 请求生命周期以及各模块解析
目录 rest_framework框架的封装特点 原生Django与DRF比较 APIView 的请求生命周期 请求模块(request) 解析模块(parser_classes) 异常模块(exce ...
- npm 安装vue 报错Failed at the chromedriver@2.34.0 install script 'node install.js'
提示版本不够,后来百度到,在你的vue项目包下执行: npm install chromedriver --chromedriver_cdnurl=http://cdn.npm.taobao.org/ ...
- gatekeeper学习概述
1.概述 该产品部署在网络隔离装置两端,以代理程序的身份,完成两侧设备连接维护,数据转发的功能.场景简化如图所示: 软件核心是一个基于Netty的网络应用程序,考虑到系统的可维可测性,集成了web化的 ...
- elasticsearch 中文API bulk(六)
bulk API bulk API允许开发者在一个请求中索引和删除多个文档.下面是使用实例. import static org.elasticsearch.common.xcontent.XCont ...
- 2019-5-21-C#-命令行如何静默调用-del-删除文件
title author date CreateTime categories C# 命令行如何静默调用 del 删除文件 lindexi 2019-05-21 11:32:28 +0800 2019 ...
- linux服务器之间传输文件
转载:https://www.jb51.net/article/82608.htm 1. scp(最近就使用了scp) [优点]简单方便,安全可靠:支持限速参数 [缺点]不支持排除目录[用法]scp就 ...
- [NOI2003]逃学的小孩【观察+树的直径】
Online Judge:Bzoj1509,Luogu P4408 Label:观察,树的直径 题目描述 输入 第一行是两个整数N(\(3≤N≤200000\))和M,分别表示居住点总数和街道总数.以 ...
- C/C++编译的程序内存组成:
#include int main(){int a[1000000];//局部变量return 0;}编译运行后发现溢出错误.#include int a[1000000];//全局变量int mai ...
- List -- 变更列表
1,一些常见的内建函数 L.append # 加一个 L.extend # 加一串 L.insert(index, item) #固定位置插入 L.[index : index] = sequence ...
- JS播放视频代码
<div class="col-md-8"> <div id="moviecontainer"></div> </di ...