【问题标题】:Failed to connect to binary FirefoxBinary(/usr/bin/firefox) on port 7055无法连接到端口 7055 上的二进制 FirefoxBinary(/usr/bin/firefox)
【发布时间】:2015-09-30 09:03:11
【问题描述】:

我正在使用 selenium 在 Java 上运行测试。

当我进行样本测试时。我得到以下内容

Build info: version: '2.47.2', revision: '4d972c01cab1304452627f837654326a11eb92fe', time: '2015-09-24 09:17:17'
System info: host: 'lima', ip: '127.0.1.1', os.name: 'Linux', os.arch: 'amd64', os.version: '3.2.0-32-generic', java.version: '1.8.0_45'
Driver info: driver.version: FirefoxDriver
    at org.openqa.selenium.firefox.internal.NewProfileExtensionConnection.start(NewProfileExtensionConnection.java:134)
    at org.openqa.selenium.firefox.FirefoxDriver.startClient(FirefoxDriver.java:276)
    at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:116)
    at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:221)
    at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:216)
    at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:133)
Caused by: org.openqa.selenium.firefox.NotConnectedException: Unable to connect to host 127.0.0.1 on port 7055 after 45000 ms. Firefox console output:
    addons.manager  DEBUG   Provider finished startup: PluginProvider
1443602965766   addons.manager  DEBUG   Completed startup sequence
1443602966724   DeferredSave.extensions.json    DEBUG   Save changes
1443602966725   addons.xpi  DEBUG   Updating XPIState for {"id":"fxdriver@googlecode.com","syncGUID":"W4MC2I4gSaDP","location":"app-profile","version":"2.47.1","type":"extension","internalName":null,"updateURL":null,"updateKey":null,"optionsURL":null,"optionsType":null,"aboutURL":null,"iconURL":null,"icon64URL":null,"defaultLocale":{"name":"Firefox WebDriver","description":"WebDriver implementation for Firefox","creator":"Simon Stewart","homepageURL":null},"visible":true,"active":false,"userDisabled":false,"appDisabled":false,"descriptor":"/tmp/anonymous2411601304142570791webdriver-profile/extensions/fxdriver@googlecode.com","installDate":1443602959000,"updateDate":1443602959000,"applyBackgroundUpdates":1,"bootstrap":false,"size":8234871,"sourceURI":null,"releaseNotesURI":null,"softDisabled":false,"foreignInstall":true,"hasBinaryComponents":true,"strictCompatibility":false,"locales":[],"targetApplications":[{"id":"{ec8030f7-c20a-464f-9b0e-13a3a9e97384}","minVersion":"3.0","maxVersion":"66.*"}],"targetPlatforms":[{"os":"Darwin","abi":null},{"os":"SunOS","abi":null},{"os":"FreeBSD","abi":null},{"os":"OpenBSD","abi":null},{"os":"WINNT","abi":"x86-msvc"},{"os":"Linux","abi":null}],"multiprocessCompatible":false,"signedState":0}
1443602966725   addons.xpi  DEBUG   getModTime: Recursive scan of fxdriver@googlecode.com
1443602966736   DeferredSave.extensions.json    DEBUG   Save changes
1443602966739   DeferredSave.extensions.json    DEBUG   Save changes
1443602966739   addons.xpi  DEBUG   Updating XPIState for {"id":"fxdriver@googlecode.com","syncGUID":"W4MC2I4gSaDP","location":"app-profile","version":"2.47.1","type":"extension","internalName":null,"updateURL":null,"updateKey":null,"optionsURL":null,"optionsType":null,"aboutURL":null,"iconURL":null,"icon64URL":null,"defaultLocale":{"name":"Firefox WebDriver","description":"WebDriver implementation for Firefox","creator":"Simon Stewart","homepageURL":null},"visible":true,"active":false,"userDisabled":false,"appDisabled":true,"descriptor":"/tmp/anonymous2411601304142570791webdriver-profile/extensions/fxdriver@googlecode.com","installDate":1443602959000,"updateDate":1443602959000,"applyBackgroundUpdates":1,"bootstrap":false,"size":8234871,"sourceURI":null,"releaseNotesURI":null,"softDisabled":false,"foreignInstall":true,"hasBinaryComponents":true,"strictCompatibility":false,"locales":[],"targetApplications":[{"id":"{ec8030f7-c20a-464f-9b0e-13a3a9e97384}","minVersion":"3.0","maxVersion":"66.*"}],"targetPlatforms":[{"os":"Darwin","abi":null},{"os":"SunOS","abi":null},{"os":"FreeBSD","abi":null},{"os":"OpenBSD","abi":null},{"os":"WINNT","abi":"x86-msvc"},{"os":"Linux","abi":null}],"multiprocessCompatible":false,"signedState":0}
1443602966740   DeferredSave.extensions.json    DEBUG   Save changes
1443602970172   addons.manager  DEBUG   Starting provider: <unnamed-provider>
1443602970172   addons.manager  DEBUG   Registering shutdown blocker for <unnamed-provider>
1443602970172   addons.manager  DEBUG   Provider finished startup: <unnamed-provider>
1443602971358   DeferredSave.extensions.json    DEBUG   Write succeeded
1443602971358   addons.xpi-utils    DEBUG   XPI Database saved, setting schema version preference to 17
1443602971359   DeferredSave.extensions.json    DEBUG   Starting timer
1443602971422   DeferredSave.extensions.json    DEBUG   Starting write
1443602971426   addons.repository   DEBUG   No addons.json found.
1443602971427   DeferredSave.addons.json    DEBUG   Save changes
1443602971433   DeferredSave.addons.json    DEBUG   Starting timer
1443602971450   addons.manager  DEBUG   Starting provider: PreviousExperimentProvider
1443602971450   addons.manager  DEBUG   Registering shutdown blocker for PreviousExperimentProvider
1443602971450   addons.manager  DEBUG   Provider finished startup: PreviousExperimentProvider
1443602971477   DeferredSave.extensions.json    DEBUG   Write succeeded
1443602971487   DeferredSave.addons.json    DEBUG   Starting write
1443602971502   DeferredSave.addons.json    DEBUG   Write succeeded
    at org.openqa.selenium.firefox.internal.NewProfileExtensionConnection.start(NewProfileExtensionConnection.java:122)
    ... 44 more


Results :

Failed tests:   test(test.SampleTest): Failed to connect to binary FirefoxBinary(/usr/bin/firefox) on port 7055; process output follows: (..)

我的依赖版本是

    <dependency>
        <groupId>org.seleniumhq.selenium</groupId>
        <artifactId>selenium-java</artifactId>
        <version>2.47.2</version>
    </dependency>

Firefox 版本是 41.0b8

希望firefox和selenium版本匹配时解决这个问题。

谁能告诉我哪个 selenium 版本与 firefox-41.0b8 版本匹配

【问题讨论】:

    标签: java firefox selenium


    【解决方案1】:

    我认为最新版本的 selenium 不支持 firefox 41.0 beta 版本。此外,您指的是测试版而不是稳定版。将您的浏览器降级到最新版本的 selenium 支持的版本。检查 selenium 的更改日志

    截至本文,Selenium v2.47 支持firefox v39。希望对您有所帮助。

    【讨论】:

      猜你喜欢
      • 2013-09-02
      • 1970-01-01
      • 1970-01-01
      • 2017-07-02
      • 2012-02-10
      • 1970-01-01
      • 1970-01-01
      • 2013-03-02
      • 1970-01-01
      相关资源
      最近更新 更多