Firefox WebDriver:连接二进制文件失败

5
我有一个基于WebDriverJava测试套件,我试图在Jenkins上执行它。项目已导入并且构建成功。
在测试执行期间,我遇到了以下问题:

正在运行TestRunner 使用以下内容配置TestNG:org.apache.maven.surefire.testng.conf.TestNG652Configurator@2437c6dc org.openqa.selenium.firefox.NotConnectedException: 在45000毫秒后无法连接到主机127.0.0.1上的端口7055。Firefox控制台输出

看起来找不到二进制文件,但它位于给定的路径中。

失败的测试:runBeforeTest(TestRunner):无法连接到二进制文件FirefoxBinary(/home/user1/Desktop/firefox/firefox-bin)的端口7055;进程输出如下:(..)

在执行之前,我启动了X服务器。
Xvfb :19 -screen 0 1024x768x16 &
export DISPLAY=:19
firefox &

版本:

Ubuntu 16.04.3
Selenium 2.53.1
Firefox 55.0
Jenkins 2.60.3

检查Firefox/Selenium版本兼容性。 - Luciano van der Veekens
@LucianovanderVeekens:我该怎么做? - plaidshirt
嗨@plaidshirt,你解决了这个问题吗?我也遇到了同样的问题。 - user12345
@user12345:是的,请检查已批准的解决方案,这是由版本不匹配引起的。 - plaidshirt
1个回答

2
这很可能是 Selenium 和 Firefox 之间版本不匹配的问题。
根据他们 GitHub 上的一条评论,Selenium 2.53.1 版本已知能够与 Firefox 47.0.1 版本良好地兼容。

https://github.com/SeleniumHQ/selenium/issues/2527

要继续使用Firefox 55,您需要使用更高版本的Selenium(如果已经支持)。

我将Firefox更改为47.0.1,并使用此JSON获得相同的错误:““Ubuntu Modifications”,“description”:“Pachetul Ubuntu Firefox。”,“creator”:“Canonical Ltd。”,“homepageURL”:null}... - plaidshirt

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接