Selenium2学习-038-firefox、webdriver版本不对称问题解决:org.openqa.selenium.firefox.NotConnectedException: Unable to connect to host 127.0.0.1 on port 7055
今天有个朋友在群里问,为何脚本运行不通过,其脚本操作步骤简单描述如下:
1、启动火狐浏览器
2、打开百度
3、查询框输入关键字
4、点击按钮【百度一下】
脚本挺简单的,其给出的应用报错信息如下所示:
[TestNG] Running:
C:\Users\jiwei.xu\AppData\Local\Temp\testng-eclipse--429788523\testng-customsuite.xml org.openqa.selenium.firefox.NotConnectedException: Unable to connect to host 127.0.0.1 on port 7055 after 45000 ms. Firefox console output:
看了一下他的脚本,发现脚本没有问题,然后要了一份详细的报错信息,发现了如下所示的错误:
FAILED CONFIGURATION: @BeforeClass beforeClass
org.openqa.selenium.WebDriverException: Failed to connect to binary FirefoxBinary(C:\Program Files (x86)\Mozilla Firefox\firefox.exe) on port 7055; process output follows:
modules/Task.jsm:315:40
TaskImpl@resource://gre/modules/Task.jsm:276:3
createAsyncFunction/asyncFunction@resource://gre/modules/Task.jsm:250:14
loadManifestFromZipFile<@resource://gre/modules/addons/XPIProvider.jsm:1451:26
TaskImpl_run@resource://gre/modules/Task.jsm:315:40
TaskImpl@resource://gre/modules/Task.jsm:276:3
createAsyncFunction/asyncFunction@resource://gre/modules/Task.jsm:250:14
loadManifestFromFile@resource://gre/modules/addons/XPIProvider.jsm:1461:12
AddonInstaller.InstallerService._shouldInstall/<@resource://addoninstaller/installerService.js:341:49
safeCall@resource://gre/modules/AddonManager.jsm:179:5
makeSafe/<@resource://gre/modules/AddonManager.jsm:195:25
Handler.prototype.process@resource://gre/modules/Promise.jsm -> resource://gre/modules/Promise-backend.js:933:23
this.PromiseWalker.walkerLoop@resource://gre/modules/Promise.jsm -> resource://gre/modules/Promise-backend.js:812:7
this.PromiseWalker.scheduleWalkerLoop/<@resource://gre/modules/Promise.jsm -> resource://gre/modules/Promise-backend.js:746:11
由以上信息看出,webdriver 无法启动火狐浏览器,从而得知导致失败错误的原因是:webdriver 版本不支持 火狐浏览器的版本导致的。
让其更换为最新的 webdriver jar 包后,问题得以解决! ^_^
建议大家在遇到问题时,依据如下步骤去解决:
1、首先查看日志、控制台报错信息
2、查验是否脚本的问题
3、查验环境问题
4、依据日志、控制台报错信息,自行解决拍错
5、查询百度、谷歌、响应的技术论坛
6、在相应的 QQ 群中虚心请教大神
PS:请教大神注意的事项:
1、回答你是友情,没人回答也不要抱怨,因为这不是义务
2、回答了,无论解决与否都要感恩解答的人
3、提问时,要简明的说明:问题、环境、步骤、主要错误日志信息、自己尝试过的方案(解决问题所做的努力)
4、提问后,要时常查看群消息,免得又人解答问你问题你又不在,要积极配合
5、能提供文本的,绝不提供截图
6、若条件允许,最好给出相应的脚本代码段
至此,WebUI 自动化功能测试脚本第 038-firefox、webdriver版本对称问题解决:org.openqa.selenium.firefox.NotConnectedException: Unable to connect to host 127.0.0.1 on port 7055 顺利完结,希望此文能够给初学 Selenium 的您一份参考。
最后,非常感谢亲的驻足,希望此文能对亲有所帮助。热烈欢迎亲一起探讨,共同进步。非常感谢! ^_^
Selenium2学习-038-firefox、webdriver版本不对称问题解决:org.openqa.selenium.firefox.NotConnectedException: Unable to connect to host 127.0.0.1 on port 7055的更多相关文章
- WebDriver:org.openqa.selenium.firefox.NotConnectedException: Unable to connect to host 127.0.0.1 on port 7055 after 45000 ms
今天尝试最新的webDriver与fireFox搭配: 运行代码时出现如下的问题,但是浏览器却可以打开: org.openqa.selenium.firefox.NotConnectedExcepti ...
- selenium 运行之后错误提示Unable to connect to host 127.0.0.1 on port 7055 after 45000 ms. Firefox console output
错误提示: org.openqa.selenium.firefox.NotConnectedException: Unable to connect to host 127.0.0.1 on port ...
- 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 ...
- TestNG:org.openqa.selenium.firefox.NotConnectedException: Unable to connect
http://blog.sina.com.cn/s/blog_68f262210102vgzj.html 今天在尝试着用TestNG写一下自动化测试用例,以前也写过,不过用的是经常封装的代码,现在完全 ...
- selenium在Eclipse中打开fireFox浏览器是报报错connect to host 127.0.0.1 on port 7055
1.相信很多同学刚接触selenium时,在Eclipse中打开fireFox浏览器是报报错: org.openqa.selenium.firefox.NotConnectedException: U ...
- Selenium2学习-005-WebUI自动化实战实例-003-三种浏览器(Chrome、Firefox、IE)启动脚本源代码
此文主要通过 三种浏览器(Chrome.Firefox.IE)启动脚本 功能,进行 Selenium2 三种浏览器启动方法的实战实例讲解.文中所附源代码于 2015-01-18 20:33 亲测通过, ...
- 解决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. ...
- Selenium2学习-042-Selenium3启动Firefox Version 48.x浏览器(ff 原生 geckodriver 诞生)
今天又被坑了一把,不知谁把 Slave 机的火狐浏览器版本升级为了 48 的版本,导致网页自动化测试脚本无法启动火狐的浏览器,相关的网页自动化脚本全线飘红(可惜不是股票,哈哈哈...),报版本不兼容的 ...
随机推荐
- jQuery Dialog and timepicker显示层的问题
timepicker官网http://timepicker.co/demos/ 当在dialogue上面调用时间选择时,时间选择的框框被dialogue窗口挡住了. 搜出来的方法说修改css,根本改不 ...
- 目前quanben评十大哲学家
排名分先后,包含时间.地区和主要正面成就以及其他代表人物. 1. 伊曼努尔·康德:十八世纪:东普鲁士:理性的界限,现象和本体分立以及主体的地位2. 柏拉图:公元前三四百年:古希腊:理想(念)世界3. ...
- Codeforces Round #243 (Div. 2) C. Sereja and Swaps
由于n比较小,直接暴力解决 #include <iostream> #include <vector> #include <algorithm> #include ...
- 【HDU】1846 Brave Game
http://acm.hdu.edu.cn/showproblem.php?pid=1846 题意:二人博弈,1堆石子每次取1~m个,没有石子可取的输,输出先手胜利还是后手胜利. #include & ...
- js,html,css注释大集合
1.js注释: 单行注释,在注释内容前加符号 “//” <script type="text/javascript"> document.write("单行注 ...
- 【POJ3667】Hotel
Description The cows are journeying north to Thunder Bay in Canada to gain cultural enrichment and e ...
- UITableView常见 UI 问题总结
一,经历 1.让 group 形式的UITableView的单元格也可以修改separatorStyle属性来设置. 2.修改group形式的UITableView的 cell 之间的间距,可以更改s ...
- Linux下多进程编程之exec函数语法及使用实例
exec函数族 1)exec函数族说明 fork()函数用于创建一个子进程,该子进程几乎复制了父进程的全部内容,但是,这个新创建的进程如何执行呢?exec函数族就提供了一个在进程中启动另一个程序执行的 ...
- SQL Server 父子迭代查询语句,树状查询(转)
-- Get childs by parent id WITH Tree AS ( SELECT Id,ParentId FROM dbo.Node P WHERE P.Id = -- parent ...
- 线上Java应用排查和诊断规范
@郑昀 整理 标准做法一:OOM触发HeadpDump 目的: OOM发生时,输出堆栈快照文件,供研发人员分析. 在JVM中,如果98%的时间是用于 GC 且可用的 Heap size 不足2%的时候 ...