无法在端口7055上连接到二进制FirefoxBinary(/ usr / bin / firefox)

时间:2015-09-30 09:03:12

标签: java firefox selenium

我正在使用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版本相匹配

1 个答案:

答案 0 :(得分:0)

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

截至此帖子,Selenium v2.47支持firefox v39。希望它有所帮助。