TestNG:org.openqa.selenium.firefox.NotConnectedException: Unable to connect
http://blog.sina.com.cn/s/blog_68f262210102vgzj.html
今天在尝试着用TestNG写一下自动化测试用例,以前也写过,不过用的是经常封装的代码,现在完全自己配置环境了,可是一运行,发现报错了:
org.openqa.selenium.firefox.NotConnectedException: Unable to connect to host 127.0.0.1 on port 7055 after 45000 ms. Firefox console output:
tensions\\cemigration@mozillaonline.com.xpi","mtime":1406253406712},"coba@mozilla.com.cn":{"descriptor":"C:\\Users\\liuru\\AppData\\Local\\Temp\\anonymous123678787491609026webdriver-profile\\extensions\\coba@mozilla.com.cn","mtime":1406253407262,"rdfTime":1392884482000},"commonfix@mozillaonline.com":{"descriptor":"C:\\Users\\liuru\\AppData\\Local\\Temp\\anonymous123678787491609026webdriver-
......
貌似firefox有问题了,只好在网上查了一下。
webdriver启动firefox时如果遇到以下错误,则说明selenium的版本和firefox不兼容了,需要升级selenium:
org.openqa.selenium.firefox.NotConnectedException: Unable to connect to host 127.0.0.1 on port 7055
Selenium ->FireFox
2.25.0 -> 18
2.30.0 ->19
2.31.0 ->20
升级selenium jar包
正常启动firefox
我的firefox是最新的,而selenium为2.30,可能有点儿低了,于是就下载了一个高级点儿的,2.43.0的,重新运行了一下,成功!!
TestNG:org.openqa.selenium.firefox.NotConnectedException: Unable to connect的更多相关文章
- 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.点击按钮[百度一下] 脚本挺简单的,其给出的应用报错信息如下所示: ...
- 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 ...
- 报错org.openqa.selenium.WebDriverException: disconnected: unable to connect to renderer解决方法
做自动化时经常会遇到不兼容的问题,比如以下简单的脚本,主要是打开浏览器,然后最大化窗口,打开百度,输入内容搜索,代码如下: package com.gs.selenium; import org.op ...
- selenium 问题:Unable to connect to host 127.0.0.1 on port 7055 after 45000 ms
问题:Unable to connect to host 127.0.0.1 on port 7055 after 45000 ms 原因: selenium-server-standalone-x. ...
- 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 运行之后错误提示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 ...
- 解决org.openqa.selenium.WebDriverException: Unable to connect to host 127.0.0.1 on port 7055 after 45000 ms org.springframework.beans.BeanInstantiation
解决方法为将selenium-server-standalone-2.37.0.jar升级至selenium-server-standalone-2.41.0.jar即可. 下载地址:http://s ...
- org.openqa.selenium.NoSuchElementException: no such element: Unable to locate element
org.openqa.selenium.NoSuchElementException: no such element: Unable to locate element(识别不到想要的元素) 想获取 ...
- Java+selenium+Firefox/ IE/ Chrome主流浏览器自动化环境搭建
一.java+selenium+firefox 1.环境准备:JDK1.8 2.安装firefox浏览器v59 3.下载驱动:https://github.com/mozilla/geckodrive ...
随机推荐
- linux包-下载-curl与wget
[root@localhost ~]# rpm -qa|grep curllibcurl-7.19.7-37.el6_4.x86_64python-pycurl-7.19.0-8.el6.x86_64 ...
- python input() 与 raw_input()
使用input和raw_input都可以读取控制台的输入,但是input和raw_input在处理数字时是有区别的 当输入为纯数字时: input返回的是数值类型,如int,floatraw_inpo ...
- Java Dns Cache Manipulator
通过代码直接设置Java的DNS(实际上设置的是DNS Cache),支持JDK 6+. 功能 设置/重置DNS(不会再去Lookup DNS) 可以设置单条 或是通过Properties文件批量设 ...
- MATLAB中trapz和cumtrapz函数
这两个函数都是MATLAB中的内置函数,是基于梯形法则的数值积分公式 例如我们有函数y=x^3-2x-3,为了计算在[0,1]上的积分,可以这么做: 其中x和y分别是自变量和对应的值,trapz其实就 ...
- 【Properties文件】Java使用Properties来读取配置文件
配置文件位置及内容 执行结果 程序代码 package Utils.ConfigFile; import java.io.BufferedInputStream; import java.io.B ...
- Redis资料汇总专题
1.Redis是什么? 十五分钟介绍 Redis数据结构 Redis系统性介绍 一个很棒的Redis介绍PPT 强烈推荐!非同一般的Redis介绍 Redis之七种武器 锋利的Redis redis ...
- bzoj4702: 装箱游戏
Description Alice和Bob正在玩一个非常无聊的游戏以打发时间.游戏是这样的.初始的时候,有n个箱子和m个物品.箱子.物 品都是不同的.因此有nm种方法把这些物品放到箱子里.两个人轮流操 ...
- RDP setting group policy
RDP setting group policy 1.Login to domain controller and go to Group Policy Management tool2.Click ...
- c#无限级分类
data: [ { text: '节点1', icon: myaccount, children: [ { text: '节点1.1', icon: archives }, { text: '节点1. ...
- (C#) Action, Func, Predicate 等泛型委托
(转载网络文章) (1). delegate delegate我们常用到的一种声明 Delegate至少0个参数,至多32个参数,可以无返回值,也可以指定返回值类型. 例:public del ...