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路径下
随机推荐
- Python Day20
Django 表操作 1.基本操作 # 增 # # models.Tb1.objects.create(c1='xx', c2='oo') 增加一条数据,可以接受字典类型数据 **kwargs # o ...
- Nginx配置文件
https://www.digitalocean.com/community/tutorials/understanding-the-nginx-configuration-file-structur ...
- Redis Cluster
使用 Redis Cluster Redis 3.0 在2015年出了Stable版本,3.0版本相对于2.8版本带来的主要新特性包括: 实现了Redis Cluster,从而做到了对集群的支持: 引 ...
- [.net core]简介(转)
原文地址:https://docs.microsoft.com/zh-cn/dotnet/articles/core/ NET Core 是一个通用开发平台,由 Microsoft 和 GitHub ...
- ActiveMQ集群下的消息回流功能
------------------------------------------------------------------ "丢失"的消息 如果有broker1和brok ...
- yii2 解决POST 400错误
第一种解决办法是关闭Csrf public function init(){ $this->enableCsrfValidation = false; } 第二种解决办法是在form表单中加入隐 ...
- Myeclipse不显示js文件错误的方法
最近在学后台,用Myeclipse ,那么问题来了,Myeclipse 总是喜欢报 js 文件的错误,这就很烦了,看着也不舒服. 查看资料后,解决方法如下: 项目[鼠标右键] -> MyEcli ...
- CI模板加载css和js
1.需求 ci无法加载css和js文件. 2.解决 删除..htaccess文件. 在config目录下配置base_url,并传给页面 $base_url = $this->config-&g ...
- python界面
import easygui as g import sys while 1: g.msgbox("我一定要学会编程!","加油!") #choices = [ ...
- 【Network】Neutron-Docker-K8S
Neutron-Docker-K8S openstack/neutron: Neutron is a virtual network service for Openstack. Neutron和SD ...