我正在尝试作为maven构建的一部分运行selenium测试,这是我的参考:http://www.gitshah.com/2010/10/how-to-run-selenium-tests-as-part-of.html?showComment=1326627249570#c2296284119877744512
客户端驱动程序selenium-java-客户端驱动程序1.0.2测试org.seleniumhq.webdriver webdriver 0.9.7376
org.apache.maven.plugins maven-war-plugin 2.1.1 org.codehaus.mojo selenium-maven-plugin启动预集成-测试启动服务器真真正的停止后集成测试停止服务器org.codehaus.cargo cargo-maven2 2-plugin false tomcat7x已安装${env.CATALINA_HOME}启动-容器预集成-test启动部署停止-容器后集成-测试停止org.apache.maven.plugins maven-surefire-plugin2.8 org.junit:com.springsource.org.junit **/unit/*Test.java集成-测试集成-测试测试假无**/integration/*Test.java
当运行集成测试( firefox打开一个空白页面)时,我得到了以下异常:
Failed to connect to binary FirefoxBinary(C:\Program Files (x86)\Mozilla Firefox\firefox.exe) on port 7055更新:我正在使用Firefox9。
发布于 2012-01-15 13:16:31
使用下列依赖项后,错误将消失:
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-firefox-driver</artifactId>
<version>2.16.1</version>
</dependency>把这个移除:
<dependency>
<groupId>org.seleniumhq.webdriver</groupId>
<artifactId>webdriver-firefox</artifactId>
<version>0.9.7376</version>
</dependency>发布于 2012-01-15 15:35:24
至少需要Selenium版本2.15才能支持Firefox 9(参考文献)。http://selenium.googlecode.com/svn/trunk/java/CHANGELOG)。
发布于 2015-03-09 12:29:37
我也有同样的问题。修复了v36.01中的错误,如果您有该版本,并且仍然出现问题,请重新安装它
https://stackoverflow.com/questions/8869500
复制相似问题