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的更多相关文章

  1. 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.点击按钮[百度一下] 脚本挺简单的,其给出的应用报错信息如下所示: ...

  2. 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 ...

  3. 报错org.openqa.selenium.WebDriverException: disconnected: unable to connect to renderer解决方法

    做自动化时经常会遇到不兼容的问题,比如以下简单的脚本,主要是打开浏览器,然后最大化窗口,打开百度,输入内容搜索,代码如下: package com.gs.selenium; import org.op ...

  4. 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. ...

  5. 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 ...

  6. 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 ...

  7. 解决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 ...

  8. org.openqa.selenium.NoSuchElementException: no such element: Unable to locate element

    org.openqa.selenium.NoSuchElementException: no such element: Unable to locate element(识别不到想要的元素) 想获取 ...

  9. Java+selenium+Firefox/ IE/ Chrome主流浏览器自动化环境搭建

    一.java+selenium+firefox 1.环境准备:JDK1.8 2.安装firefox浏览器v59 3.下载驱动:https://github.com/mozilla/geckodrive ...

随机推荐

  1. 012. asp.net生成验证码图片(汉字示例/字母+数字)

    protected void Page_Load(object sender, EventArgs e) { //生成验证码图片的基本步骤 string checkCode = "新年快乐& ...

  2. Git服务器搭建及SSH无密码登录设置

    在Git服务器中建立一个git帐号,用于多人使用. adduser git输入此命令后,会在/home/下建立一个git文件 /home/git 下建立.ssh目录(注意,是.ssh..有个点!) c ...

  3. 阅读layim代码小记,实现可以更改用户签名的方法

    用layim原版的时候发现,用户的签名是不能直接修改的,如下: 其实要改也很简单,查看一下源代码,然后加一个input进去,可是,加完之后是这样的: 没关系,给它一个样式,让它乖乖的“隐藏“起来. / ...

  4. IIS不定期Crash和Oracle“未处理的内部错误(-2)”的问题分析

    问题描述:系统不定期报出Oracle“未处理的内部错误(-2)”,严重时IIS会Crash 典型异常日志如下: Exception type:   System.AccessViolationExce ...

  5. Android Studio如何添加override

    而Android Studio如何添加呢?方法如下: 右键(或者Alt + Insert) ---  Generate... ---- Override Method...  或者 Implement ...

  6. eclipse解压后启动弹出A Java Runtime Evironment(JRE) or Java Development Kit(JDK)....

    系统环境:win7 64bit JDK:jdk-7u79-windows-x64 Eclipse:eclipse-jee-helios-win32 启动eclipse:弹出A Java Runtime ...

  7. HBase(一): c#访问hbase组件开发

    HDP2.4安装系列介绍了通过ambari创建hbase集群的过程,但工作中一直采用.net的技术路线,如何去访问基于Java搞的Hbase呢? Hbase提供基于Java的本地API访问,同时扩展了 ...

  8. Android Virtual Device(AVD)屏幕大小调整

    (1)各种常用机型的分辨率列表如下: WXGA800                 480X800 WVGA854                 480X854 WXGA720          ...

  9. Linux From Scratch [1]

    0. 首先解释下build, host和target build:编译过程运行在build上 host:编译出来的东西运行在host上 target:运行在host上的编译器编译出来的东西运行于tar ...

  10. Spring实战6:利用Spring和JDBC访问数据库

    主要内容 定义Spring的数据访问支持 配置数据库资源 使用Spring提供的JDBC模板 写在前面:经过上一篇文章的学习,我们掌握了如何写web应用的控制器层,不过由于只定义了SpitterRep ...