selenium运行测试脚本失败,提示Unable to connect to host 127.0.0.1
2017-01-02 17:45
477 查看
运行环境
浏览器版本:firefox50.1.0
selenium:selenium2.53.1
运行脚本
package simpletest;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.firefox.FirefoxDriver;
public class ById {
public
static void main(String[]
args) {
WebDriver driver =
null;
System.setProperty("webdriver.gecko.driver",
"/Users/chenxuejiao/TestTools/selenium2.53.1/geckodriver");
driver =
new FirefoxDriver();
driver.get("https://www.baidu.com/");
driver.close();
}
}
运行时出现的问题
使用selenium运行访问百度首页时失败,提示org.openqa.selenium.firefox.NotConnectedException: Unable to connect to host 127.0.0.1 on port 7055 after 45000 ms
原因分析
网上搜索,造成此问题原因是由于firefox版本和selenium版本不匹配造成的。由于我的firefox版本比较新,所以我猜想,应该是我的selenium jar包过低。
解决方案
下载最新的selenium-server-standalone-3.0.1后,程序正常运行。
浏览器版本:firefox50.1.0
selenium:selenium2.53.1
运行脚本
package simpletest;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.firefox.FirefoxDriver;
public class ById {
public
static void main(String[]
args) {
WebDriver driver =
null;
System.setProperty("webdriver.gecko.driver",
"/Users/chenxuejiao/TestTools/selenium2.53.1/geckodriver");
driver =
new FirefoxDriver();
driver.get("https://www.baidu.com/");
driver.close();
}
}
运行时出现的问题
使用selenium运行访问百度首页时失败,提示org.openqa.selenium.firefox.NotConnectedException: Unable to connect to host 127.0.0.1 on port 7055 after 45000 ms
原因分析
网上搜索,造成此问题原因是由于firefox版本和selenium版本不匹配造成的。由于我的firefox版本比较新,所以我猜想,应该是我的selenium jar包过低。
解决方案
下载最新的selenium-server-standalone-3.0.1后,程序正常运行。
相关文章推荐
- 解决org.openqa.selenium.WebDriverException: Unable to connect to host 127.0.0.1 on port 7055 after 45000 ms org.springframework.beans.BeanInstantiation
- WebDriver:org.openqa.selenium.firefox.NotConnectedException: Unable to connect to host 127.0.0.1 on port 7055 after 45000 ms
- selenium问题:webdriver Unable to connect to host 127.0.0.1 on port 7055
- Selenium2学习-038-firefox、webdriver版本不对称问题解决:org.openqa.selenium.firefox.NotConnectedException: Unable to connect to host 127.0.0.1 on port 7055
- org.openqa.selenium.firefox.NotConnectedException: Unable to connect to host 127.0.0.1 on port 7055
- selenium firefoxdriver:org.openqa.selenium.firefox.NotConnectedException: Unable to connect to host
- Eclipse:unable to connect to host 127.0.0.1 on port 7055
- LR回放https协议脚本失败:[GENERAL_MSG_CAT_SSL_ERROR]connect to host "XXX" failed:[10054] Connection reset by
- LR回放https协议脚本失败:[GENERAL_MSG_CAT_SSL_ERROR]connect to host "XXX" failed:[10054] Connection reset by
- 连接LinuxTelnet提示:Unable to connect to remote host: No route to host
- webdriver Unable to connect to host 127.0.0.1 on port 7055 解决方法
- 安装ADT 提示 android ADT Unable to connect to repository 或 sdk manager更新失败
- 性能loadrunner--录制脚本失败(REASON: Unable to connect to remote server: rc = -1 , le = 0)
- selenium运行火狐报错FirefoxDriver : Unable to connect to host 127.0.0.1 on port 7055
- QC远程执行脚本,提示Unable to connect the testing tool to the requested Quality Center server
- LR回放https协议脚本失败:[GENERAL_MSG_CAT_SSL_ERROR]connect to host "XXX" failed:[10054] Connection reset by peer [MsgId:MERR-27780]
- Unable to connect to host 127.0.0.1 on port 7055 的解决方法
- selenium运行火狐报错FirefoxDriver : Unable to connect to host 127.0.0.1 on port 7055
- 【Webdriver】Firefox启动后出现Unable to connect to host 127.0.0.1 on port 7055。
- Selenium firefox不兼容org.openqa.selenium.firefox.NotConnectedException: Unable to connect to host 127.