Selenium安装失败WebDriverException: Message: 'gechodriver' executable needs to be in PATH
在搭建Python+Selenium自动化测试时,用python通过WebDriver驱动Firefox浏览器时,一直无法执行测试用例。
报错信息:WebDriverException: Message: 'gechodriver' executable needs to be in PATH.

原因是:pip install selenium 时,安装的是selenium 3.0.1,而这个版本是2016年10月14日刚发布的,与Firefox 46不兼容。需要重新安装Selenium 2.53.2的旧版本。
我的电脑环境;
Python 2.7.10
Firefox 46.0.1
Selenium 2.53.2
解决方法:
解决:
- pip uninstall selenium #卸载已有的模块
- pip install selenium==2.53.2 #安装指定的版本
这时,如果timeout报错,使用python –m pip install selenium==2.53.2
安装Selenium完成后,到DOS窗口中,进入Python环境,导入WebDriver,测试是否成功

- 完全卸载firefox,需要重启电脑,重新安装Firefox
- 执行用例,成功
(完)
如果上面没有解决你的问题,请继续搜索,不要停~~~
Selenium安装失败WebDriverException: Message: 'gechodriver' executable needs to be in PATH的更多相关文章
- selenium使用遇到的问题(selenium.common.exceptions.WebDriverException: Message: 'chromedriver' executable needs to be in PATH.)
1.安装pip3 install selenium 2.使用browser=webdriver.Chrome()时报错 :selenium.common.exceptions.WebDriverExc ...
- python+selenium,打开浏览器时报selenium.common.exceptions.WebDriverException: Message: 'chromedriver' executable needs to be in PATH
有一年多没写web自动化了,今天搭建环境的时候报了一个常见错误,但是处理过程有点闹心,报错就是常见的找不到驱动<selenium.common.exceptions.WebDriverExcep ...
- centos7 selenium.common.exceptions.WebDriverException: Message: 'chromedriver' executable needs to be in PATH
1.查看安装的chrome浏览器版本 2.查看版本对应的驱动 https://sites.google.com/a/chromium.org/chromedriver/downloads 下载后拷贝到 ...
- selenium.common.exceptions.WebDriverException: Message: 'geckodriver' executable needs to be in PATH. 错误处理方法
首次使用selenium webdriver,webdriver.Firefox() 报错selenium.common.exceptions.WebDriverException: Message: ...
- selenium使用报错“selenium.common.exceptions.WebDriverException: Message: 'geckodriver' executable needs to be in PATH.”
安装了python3,使用pip安装了selenium,但是在使用时,报了“selenium.common.exceptions.WebDriverException: Message: 'gecko ...
- 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.common.exception.WebDriverException:Message:'chromedriver' executable needs to be in Path
'chromedriver' executable needs to be in Path 声明:本人萌新,刚学python不久记录一下自己的坑,发出来若能帮助到一些人尽早解决问题那便是极好的,( ̄▽ ...
- mac-webui-selenium下的webdriver selenium.common.exceptions.WebDriverException: Message: 'chromedriver' executable needs to be in PATH
from selenium import webdriver def test1(): url='http://www.baidu.com' driver=webdriver.Chrome(" ...
- python 安装selenium首次运行错误selenium.common.exceptions.WebDriverException: Message: 'chromedriver' executable needs to be in PATH
问题原因: 没有安装相关的支撑driver https://npm.taobao.org/mirrors/chromedriver/ 下载对应的driver 放置到python路径下
随机推荐
- entrar en su zapatilla de deporte en este lugar
Mientras que yo apareció su campo usando nuestro Nike Glide Wildhorse sólo dos ($ 110) zapatillas de ...
- xpath 学习一: 节点
xpath 中,有七种类型的节点: 元素.属性.文本.命名空间.处理指令.注释.以及根节点 树的根成为文档节点或者根节点. 节点关系: Parent, Children, sibling(同胞), A ...
- Request.Form接收不到post数据.
Request.Form接收不到post数据. https://q.cnblogs.com/q/62635/ Content-Type 有没有设置为 application/x-www-form-ur ...
- SpringMVC拦截器的使用
SpringMVC 中的Interceptor 拦截器也是相当重要和相当有用的,它的主要作用是拦截用户的请求并进行相应的处理.比如通过它来进行权限验证,或者是来判断用户是否登陆,或者是像12306 那 ...
- java初始化
一.成员初始化 1.成员变量没有赋值,则被初始化成默认值. 2.局部变量没有赋值,编译时报错. 二.构造器初始化 1.成员变量在构造器初始化之前,已经被初始化. 2.变量定义的顺序决定了初始化的顺序. ...
- Libero 使用拾忆
使用Libero软件进行管脚分配的时候可以使用脚本语言,详细的使用说明见des_constraints_ug.pdf(在Libero安装目录下寻找) 如: set_io srame_oe -REGIS ...
- 在sql语句中使用 xml for path 格式化字符串的方法总结
此方法实现的是将查询表中的某个字段,格式化成 字符串1,字符串2,字符串3...的格式 假设我们现在有两个表 分别是 分组表 grouped和分组成员表 groupuser grouped表有连个字 ...
- 深入浅析JAVA注解
注解,相信大家都会知道,像@requestMapping,@Resource,@Controller等等的一些注解,大家都用过,那么,他的工具类你用过吗?下面就和大家一起来分享一下注解工具类. 注解的 ...
- JavaScript数组去重
第一种方法: 思路: 1.创建一个新的数组存放结果 2.创建一个空对象, 3.将数组中的元素作为空对象的属性并对其赋值,每次取出一个元素与对象进行对比,然后到对象中去访问这个属性, 如果能访问到值,则 ...
- swift与OC之间不得不知道的21点
swift与OC之间不得不知道的21点 自6月的WWDC大会上由苹果的大神Chris Lattner向我们首次展示swift至今已经大半年时间了,虽然绝大部分软件公司代码里还都见不到一丁点swif ...