Failed to connect to binary FirefoxBinary

73 views
Skip to first unread message

R. Sowmya

unread,
Jun 16, 2015, 1:15:21 AM6/16/15
to seleniu...@googlegroups.com
  When I try to launch the firebox browser the below error occurs.


         org.openqa.selenium.WebDriverException: Failed to connect to binary FirefoxBinary(C:\Program Files (x86)\Mozilla Firefox\firefox.exe) on port 7055; process output follows: 
1434430618461 addons.manager DEBUG Application has been upgraded
1434430618558 addons.manager DEBUG Loaded provider scope for resource://gre/modules/addons/XPIProvider.jsm: ["XPIProvider"]
1434430618561 addons.manager DEBUG Loaded provider scope for resource://gre/modules/LightweightThemeManager.jsm: ["LightweightThemeManager"]
1434430618564 addons.xpi DEBUG startup
1434430618565 addons.xpi DEBUG Skipping unavailable install location app-system-local
1434430618566 addons.xpi DEBUG Skipping unavailable install location app-system-share
1434430618571 addons.xpi DEBUG Ignoring file entry whose name is not a valid add-on ID: C:\Users\IBM_AD~1\AppData\Local\Temp\anonymous4940634188594789715webdriver-profile\extensions\webdriver-staging
1434430618599 addons.xpi DEBUG checkForChanges
*** Blocklist::_loadBlocklistFromFile: blocklist is disabled
1434430620528 addons.xpi DEBUG Installed distribution add-on IBM...@firefox-extensions.ibm.com
1434430624811 addons.xpi DEBUG Installed distribution add-on ie...@ip.cn
1434430642478 addons.xpi DEBUG Installed distribution add-on langpac...@firefox.mozilla.org
1434430653391 addons.xpi DEBUG Installed distribution add-on langpac...@firefox.mozilla.org

Build info: version: '2.45.0', revision: '5017cb8', time: '2015-02-26 23:59:50'
System info: host: 'ADMINIB-F4OFK81', ip: '9.193.110.169', os.name: 'Windows 7', os.arch: 'amd64', os.version: '6.1', java.version: '1.8.0'
Driver info: driver.version: BrowserDriver
at org.openqa.selenium.firefox.internal.NewProfileExtensionConnection.start(NewProfileExtensionConnection.java:134)
at org.openqa.selenium.firefox.FirefoxDriver.startClient(FirefoxDriver.java:246)
at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:114)
at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:193)
at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:186)
at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:182)
at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:95)
at com.ibm.pmc.selenium.main.BrowserDriver.initialnewbrowser(BrowserDriver.java:147)
at com.ibm.pmc.selenium.main.BrowserDriver.launchBrowser(BrowserDriver.java:48)
at com.ibm.pmc.selenium.testcases.classic.N_Level.before(N_Level.java:55)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:95)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:55)
at java.lang.reflect.Method.invoke(Method.java:495)
at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:80)
at org.testng.internal.Invoker.invokeConfigurationMethod(Invoker.java:564)
at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:213)
at org.testng.internal.Invoker.invokeMethod(Invoker.java:653)
at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:901)
at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1231)
at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:127)
at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:111)
at org.testng.TestRunner.privateRun(TestRunner.java:767)
at org.testng.TestRunner.run(TestRunner.java:617)
at org.testng.SuiteRunner.runTest(SuiteRunner.java:334)
at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:329)
at org.testng.SuiteRunner.privateRun(SuiteRunner.java:291)
at org.testng.SuiteRunner.run(SuiteRunner.java:240)
at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86)
at org.testng.TestNG.runSuitesSequentially(TestNG.java:1198)
at org.testng.TestNG.runSuitesLocally(TestNG.java:1123)
at org.testng.TestNG.run(TestNG.java:1031)
at com.ibm.pmc.selenium.main.GuiTestMain.main(GuiTestMain.java:131)
Caused by: org.openqa.selenium.WebDriverException: java.lang.InterruptedException: Process timed out after waiting for 45000 ms.
Build info: version: '2.45.0', revision: '5017cb8', time: '2015-02-26 23:59:50'
System info: host: 'ADMINIB-F4OFK81', ip: '9.193.110.169', os.name: 'Windows 7', os.arch: 'amd64', os.version: '6.1', java.version: '1.8.0'
Driver info: driver.version: BrowserDriver
at org.openqa.selenium.os.CommandLine.waitFor(CommandLine.java:131)
at org.openqa.selenium.firefox.FirefoxBinary.waitFor(FirefoxBinary.java:222)
at org.openqa.selenium.firefox.FirefoxBinary.clean(FirefoxBinary.java:242)
at org.openqa.selenium.firefox.internal.NewProfileExtensionConnection.start(NewProfileExtensionConnection.java:91)
... 33 more
Caused by: java.lang.InterruptedException: Process timed out after waiting for 45000 ms.
at org.openqa.selenium.os.UnixProcess.waitFor(UnixProcess.java:148)
at org.openqa.selenium.os.CommandLine.waitFor(CommandLine.java:129)
... 36 more


Firefox version 31.7.0
Selenium version 2.45.0

Tuấn Anh Đào

unread,
Jun 17, 2015, 6:52:28 AM6/17/15
to seleniu...@googlegroups.com
Why didn't you show your codes?
I'm using 2.44 but I believe this will work:

var profile = new OpenQA.Selenium.Firefox.FirefoxProfile(); 
profile.AddExtension("App/Firefox/example_extension.xpi");
OpenQA.Selenium.Firefox.FirefoxBinary firefox = new OpenQA.Selenium.Firefox.FirefoxBinary("App/Firefox/firefox.exe");
this.driver = new OpenQA.Selenium.Firefox.FirefoxDriver(firefox, profile);

I prefer using a portable version of firefox to avoid compatibility conflicts. (and easier to implement for clients with relative FF binary like above)

Vào 12:15:21 UTC+7 Thứ Ba, ngày 16 tháng 6 năm 2015, R. Sowmya đã viết:
Reply all
Reply to author
Forward
0 new messages