selenium与firefox版本不兼容
报错信息:
org.openqa.selenium.firefox.NotConnectedException: Unable to connect to host 127.0.0.1 on port 7055 after 45000 ms
一、 geckodriver.exe下载地址:
https://github.com/mozilla/geckodriver/releases
下载geckodriver.exe并放在C盘driver目录下。
下图说明geckodriver 15.0的版本要求selenium 版为3.3以上。 
二、对应firefox版本要求为48.0及以上
从selenium 3.0.0开始就要求firefox为48及以上版本,可以通过selenium changelog查看。
changelog查看方式: 由于浏览器访问限制无法打开selenium官网的change log, 可以通过百度搜索selenium changelog去Github上查看。

查看firefox支持版本的另一种方式:使用WINRAR打开selenium-server-standalone-3.3.1.jar>org>openqa>selenium>firefox>webdriver.xpi>install.rdf, 最后人xpi和rdf文件使用winrar右键的查看文件功能查看。

三、代码设置:

前面被注释掉的那一行“webdriver.firefox.marionette”是之前从网上找的代码,因为这句代码花费了很长的时间来定位问题。
使用这个代码的时候,运行程序一直提示本文开头的错误,所以我就以为是firefox浏览器和selenium不兼容导致,换了各种firefox浏览器版本。
换到48的时候我可以肯定selenium、geckodriver.exe、firefox版本是没有问题的,那如果有问题的话应该就是geckodriver.exe使用的问题。
后来又在网上搜到geckodriver.exe的调用方法,发现与我原来写的有区别,更新为webdriver.gecko.driver之后运行程序正确,后又将firefox升级到目前最新版52再次测试通过。
到此结束,各软件版本如下:
selenium-server-standlone-3.3.1.jar
geckodriver.exe V.15.0
firefox 48.0.2 /52.0.2
selenium与firefox版本不兼容的更多相关文章
- 解决selenium与firefox版本不兼容问题
Python环境下类比 个人使用 32位环境 Python 2.7.12 Selenium 2.53.6 Firefox 47.01 安装selenium可用pip选择对应版本,参考另一教程. 因为在 ...
- 解决selenium和FireFox版本不兼容问题
相信很多同学刚接触selenium时,在Eclipse中打开fireFox浏览器时会报错:org.openqa.selenium.firefox.NotConnectedException: Unab ...
- selenium和Firefox版本不兼容
selenium8.py coding = utf-8 from selenium import webdriver driver = webdriver.Firefox() driver.get(' ...
- selenium 与 firefox版本不兼容报错
org.openqa.selenium.firefox.NotConnectedException: Unable to connect to host 127.0.0.1 on port 7055 ...
- Selenium2学习-007-WebUI自动化实战实例-005-解决 Firefox 版本不兼容:org.openqa.selenium.WebDriverException: Failed to connect to binary FirefoxBinary
此文主要讲述 Java 运行 Selenium 脚本时,因 Friefox 浏览器版本与 selenium-server-standalone-x.xx.x.jar 不兼容引起的 org.openqa ...
- 解决Selenium与firefox浏览器版本不兼容问题
因为在用java打开firefox浏览器的时候报错 org.openqa.selenium.firefox.NotConnectedException: Unable to connect to ho ...
- Selenium firefox 版本问题
问题:Unable to connect to host 127.0.0.1 on port 7055 after 45000 ms 原因: selenium-server-standalone-x. ...
- selenium ide几个版本和对应的firefox版本
最近安装selenium ide折腾了好久,可能是目前还不太熟悉自动化脚本录制的一些知识. 通过最新版firefox59安装的selenium ide 3.0.2录制的脚本不能导出.于是下载了低版本的 ...
- selenium启动firefox、ie、chrome各浏览器方法
1.启动firefox浏览器 a.如果你的本地firefox是默认路径安装的话,如下方式即可启动浏览器 WebDriver driver = new FirefoxDriver(); driver.g ...
随机推荐
- a标签里面包含img标签,出现a标签的高度高于img标签好几个px
问题:a标签里面包含img标签,出现a标签的高度高于img标签好几个px 解决: a元素下有一个匿名文本,这个文本外有一个匿名行级盒子,它有的默认vertical-align是baseline的,而且 ...
- [转载]移动页面所需meta元素和Viewport窗口知识点
Meta标签 vs Viewport http://www.2cto.com/kf/201409/335779.html http://blog.csdn.net/freshlover/articl ...
- 修改 /var/lib/locales/supported.d/local 文件(使用 locale -a 命令查看系统中所有已配置的 locale)
转自:http://zyxhome.org/wp/cc-prog-lang/c-stdlib-setlocale-usage-note/ http://www.west263.com/info/htm ...
- 我的Android进阶之旅------>ListView中android:cacheColorHint,android:listSelector属性作用 .
( 本文转载于:http://blog.csdn.net/stonecao/article/details/6216449) 自定义listview的时候,当你不使用android:cacheColo ...
- Numpy用于数组的文件输入输出
这一章比较简单,内容也比较少.而且对于文件的读写,还是使用pandas比较好.numpy主要是读写文本数据和二进制数据的. 将数组以二进制的格式保存到硬盘上 主要的函数有numpy.save和nump ...
- 使用TortoiseGit查看以前Commit的各个快照(snapshot)
Swith/Checkout提供了这个功能. 比如从bcbc66627334204f879eff99f68e70af0ca7907e回退到dc3f82f2532fcb95e4f24c9f9c331a7 ...
- input date 对 placeholder 的支持问题
正常情况下,text 的 input 会显示 placeholder 中的值,date 类型的 input 对其支持不好.实例代码如下: <input type="text" ...
- JavaScript Date to c# Ticks
var ticks =((yourDateObject.getTime()*10000)+621355968000000000); var minDate = new Date("2013& ...
- junit在idea中的使用(1)--理论篇
感觉本文前部分配置太过繁琐,大家可以参考我的这篇文章http://www.cnblogs.com/SuMeng/p/8279879.html(junit在IDEA中使用--实践篇),用添加maven ...
- Python编程-继承和接口
一.继承 1.什么是继承 继承是一种创建新类的方式,在python中,新建的类可以继承一个或多个父类,父类又可称为基类或超类,新建的类称为派生类或子类. 继承的好处: 可以使用现有类的所有功能,并在无 ...