代码之家  ›  专栏  ›  技术社区  ›  plaidshirt

Firefox WebDriver:无法连接到二进制文件

  •  5
  • plaidshirt  · 技术社区  · 9 年前

    WebDriver 基于 Java testsuite,我尝试与Jenkins一起执行。

    在执行测试期间,我得到以下信息:

    运行TestRunner 组织。openqa。硒。firefox。NotConnectedException:45000毫秒后无法连接到端口7055上的主机127.0.0.1。Firefox控制台 输出

    它似乎没有找到二进制文件,但它位于给定的路径中。

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

    在执行之前,我启动了一个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
    
    1 回复  |  直到 9 年前
        1
  •  2
  •   Luciano van der Veekens    9 年前

    这可能是Selenium和Firefox之间的版本不匹配。

    据对他们的GitHub问题之一的评论,Selenium 2.53.1与Firefox 47.0.1配合良好。

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

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