Question

Running Selenium (Webdriver) tests with Firefox locally on my Ubuntu workstation no longer works.

The exact same setup worked before, but I think Firefox was upgraded at some point (it's now 16.0.2 from the Ubuntu package 16.0.2+build1-0ubuntu0.11.04.1), after which it stopped working. In normal use Firefox works ok.

With Webdriver, when I run a testcase (via my IDE), an empty Firefox window is opened, but the test does not start. After 45 seconds, it times out with this error message:

org.openqa.selenium.firefox.NotConnectedException: Unable to connect to host 127.0.0.1 on port 7055 after 45000 ms. Firefox console output:
*** LOG addons.xpi: startup
*** LOG addons.xpi: Ignoring file entry whose name is not a valid add-on ID: /tmp/anonymous5012217980260937474webdriver-profile/extensions/webdriver-staging
*** LOG addons.xpi: checkForChanges
*** LOG addons.xpi-utils: Opening database
*** LOG addons.xpi: Add-on {2204c510-88f3-11db-b606-0800200c9a66} modified in app-profile
*** LOG addons.xpi: Add-on yslow@yahoo-inc.com modified in app-profile
*** LOG addons.xpi: Add-on {02450954-cdd9-410f-b1da-db804e18c671} modified in app-profile
*** LOG addons.xpi: Add-on {c45c406e-ab73-11d8-be73-000a95be3b12} modified in app-profile
*** LOG addons.xpi: Add-on {a6fd85ed-e919-4a43-a5af-8da18bda539f} modified in app-profile
*** LOG addons.xpi: Add-on pythonformatters@seleniumhq.org modified in app-profile
*** LOG addons.xpi: Add-on rubyformatters@seleniumhq.org modified in app-profile
*** LOG addons.xpi: Add-on javaformatters@seleniumhq.org modified in app-profile
*** LOG addons.xpi: Add-on csharpformatters@seleniumhq.org modified in app-profile
*** LOG addons.xpi: Add-on firebug@software.joehewitt.com modified in app-profile
*** LOG addons.xpi: Loading bootstrap scope from /tmp/anonymous5012217980260937474webdriver-profile/extensions/firebug@software.joehewitt.com.xpi
*** LOG addons.xpi: Calling bootstrap method install on firebug@software.joehewitt.com version 1.10.6
*** LOG addons.xpi: New add-on fxdriver@googlecode.com installed in app-profile
*** LOG addons.xpi: Updating database with changes to installed add-ons
*** LOG addons.xpi-utils: Updating add-on states
*** LOG addons.xpi-utils: Writing add-ons list
*** LOG addons.xpi: Calling bootstrap method startup on firebug@software.joehewitt.com version 1.10.6
*** LOG ubufox.urn: Starting
*** LOG addons.xpi: shutdown
*** LOG addons.xpi-utils: shutdown
*** LOG addons.xpi-utils: Database closed
*** LOG addons.xpi: startup
*** LOG addons.xpi: Ignoring file entry whose name is not a valid add-on ID: /tmp/anonymous5012217980260937474webdriver-profile/extensions/webdriver-staging
*** LOG addons.xpi: checkForChanges
*** LOG addons.xpi: No changes found
*** LOG addons.xpi: Loading bootstrap scope from /tmp/anonymous5012217980260937474webdriver-profile/extensions/firebug@software.joehewitt.com.xpi
*** LOG addons.xpi: Calling bootstrap method startup on firebug@software.joehewitt.com version 1.10.6
*** LOG ubufox.urn: Starting

Build info: version: '2.23.1', revision: '17143', time: '2012-06-08 18:59:28'
System info: os.name: 'Linux', os.arch: 'amd64', os.version: '2.6.38-16-generic', java.version: '1.6.0_26'

Driver info: driver.version: FirefoxDriver
at org.openqa.selenium.firefox.internal.NewProfileExtensionConnection.start(NewProfileExtensionConnection.java:113)
at org.openqa.selenium.firefox.FirefoxDriver.startClient(FirefoxDriver.java:216)
at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:93)
at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:156)
at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:151)
at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:93)
at fi.company.product.testing.selenium.AbstractSeleniumTest.getFirefoxDriver(AbstractSeleniumTest.java:99)
at fi.company.product.testing.selenium.AbstractSeleniumTest.setup(AbstractSeleniumTest.java:56)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)
at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:27)
at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31)
at fi.company.product.testing.selenium.ScreenshotTestRule$1.evaluate(ScreenshotTestRule.java:27)
at org.junit.runners.BlockJUnit4ClassRunner.runNotIgnored(BlockJUnit4ClassRunner.java:79)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:71)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:49)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184)
at org.junit.runners.ParentRunner.run(ParentRunner.java:236)
at org.junit.runners.Suite.runChild(Suite.java:128)
at org.junit.runners.Suite.runChild(Suite.java:24)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184)
at org.junit.runners.ParentRunner.run(ParentRunner.java:236)
at org.junit.runner.JUnitCore.run(JUnitCore.java:157)
at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:71)
at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:199)
at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:62)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:120)

In our base test class, the FirefoxDriver is initialised simply like this:

new FirefoxDriver(new FirefoxProfile())

...although I also tried pointing to an existing Firefox profile dir (something like /home/jonik/.mozilla/firefox/vds3ono5.default) with the same result.

Any ideas how to get the tests running again?

  • Selenium (Webdriver) 2.23.1
  • Firefox 16.0.2
  • Ubuntu 11.04
Was it helpful?

Solution

Firefox 16 isn't supported in v2.23. You will have to either upgrade to v2.26, or downgrade Firefox.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top