Use Selenium WebDriver 2.53.1 with Firefox 47.0.1

TL;DR Upgrade to Firefox 47.0.1 and use Selenium WebDriver 2.53.1 (locally at the moment) to use the FirefoxDriver

I suspect this will be a fairly short lived post since Selenium WebDriver 2.53.1 will be in maven central soon. But longer term this post will act as an example of how to use a version of Selenium WebDriver that you have downloaded, without it being present in maven central repositories.

As per this tweet by Jim Evans:

Hooray. Selenium WebDriver 2.53.1 is once more compatible with `FirefoxDriver`.

So:

Since this is a temporary hack, until 2.53.1 becomes available in maven, I just added the jar file to my downloads folder and amended the pom.xml to use, as a local dependency, the downloaded version:

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

<dependency>
    <groupId>selenium_2_53_1</groupId>
    <artifactId>com.seleniumhq.selenium_2_53_1 </artifactId>
    <version>2.53.1</version>
    <scope>system</scope>
    <systemPath>
     C:/Users/Alan/Downloads/selenium-2.53.1/selenium-server-standalone-2.53.1.jar
    </systemPath>
</dependency>

Essentially I created a dependency on a local file in the system, rather than from the maven repo. There are a bunch of ways of making 2.53.1 available to maven locally, but this is the approach I tend to fall back into, because I’m usually using it for quick hacks.

When Selenium 2.53.1 is available in maven I won’t need the systemPath dependency. I’ll just un-comment back the Selenium 2.53.0 dependency, amend it to 2.53.1, and remove the `systemPath` dependency.

You could clearly add this into your resources or wherever else you want to store it. You could also add it into a local maven repo – see related links below.

I also updated from firefox 47.0 to 47.0.1

Note: You need to update both Firefox to 47.0.1 and Selenium WebDriver to 2.53.1

Then your test code should run as normal, simply by instantiating FirefoxDriver

When Selenium WebDriver 2.53.1 is available in maven then you won’t need the local pom.xml hack.

Thanks to the Selenium and Mozilla team for all their work involved in fixing this.

Remember you can also: drop down to Firefox 45 Extended Support Edition, Use portable Firefox, Use the Marionette/GeckoDriver, see the following blog posts for more details:

Related Links:

Options for using local jar files in a maven project

This entry was posted in Selenium Simplified Blog, WebDriver. Bookmark the permalink.

18 Responses to Use Selenium WebDriver 2.53.1 with Firefox 47.0.1

  1. Sandeep Jain says:

    Selenium 2.53.1 is not compatible with Firefox 49.0 beta version. Any updates on that ?

  2. Sanjay says:

    Is Selenium 2.53.0 is compatible with Firefox 48.0 version ?

  3. My Firefox browser has been updated automatically thence when i run program i,m getting firefox not connected exception what i can do now .my stand alone server 2.53.1….please suggest me which firefox version i hava to use.

  4. rohit says:

    org.openqa.selenium.WebDriverException: Unable to connect to host 127.0.0.1 on port 7055 after 45000 ms. Firefox console output:
    R2mcL”,”location”:”winreg-app-global”,”version”:”15.1.0″,”type”:”extension”,”internalName”:null,”updateURL”:null,”updateKey”:null,”optionsURL”:null,”optionsType”:null,”aboutURL”:null,”icons”:{},”iconURL”:”chrome://vscore/content/ScriptFF.gif”,”icon64URL”:null,”defaultLocale”:{“name”:”McAfee ScriptScan for Firefox”,”description”:null,”creator”:”McAfee, Inc.”,”homepageURL”:null},”visible”:true,”active”:false,”userDisabled”:true,”appDisabled”:false,”descriptor”:”C:\\Program Files (x86)\\Common Files\\McAfee\\SystemCore”,”installDate”:1467185199696,”updateDate”:1467185199696,”applyBackgroundUpdates”:1,”bootstrap”:false,”skinnable”:false,”size”:2090442,”sourceURI”:null,”releaseNotesURI”:null,”softDisabled”:false,”foreignInstall”:true,”hasBinaryComponents”:false,”strictCompatibility”:false,”locales”:[],”targetApplications”:[{“id”:”{ec8030f7-c20a-464f-9b0e-13a3a9e97384}”,”minVersion”:”1.5″,”maxVersion”:”9.9″}],”targetPlatforms”:[],”multiprocessCompatible”:false,”signedState”:0,”seen”:true}
    1478783285166 DeferredSave.extensions.json DEBUG Save changes
    1478783285166 addons.xpi DEBUG Updating database with changes to installed add-ons
    1478783285166 addons.xpi-utils DEBUG Updating add-on states
    1478783285175 addons.xpi-utils DEBUG Writing add-ons list
    1478783285186 addons.xpi DEBUG Registering manifest for C:\Program Files (x86)\Mozilla Firefox\browser\features\e10srollout@mozilla.org.xpi
    1478783285187 addons.xpi DEBUG Calling bootstrap method startup on e10srollout@mozilla.org version 1.0
    1478783285187 addons.xpi DEBUG Registering manifest for C:\Program Files (x86)\Mozilla Firefox\browser\features\firefox@getpocket.com.xpi
    1478783285188 addons.xpi DEBUG Calling bootstrap method startup on firefox@getpocket.com version 1.0.2
    1478783285189 addons.xpi DEBUG Registering manifest for C:\Program Files (x86)\Mozilla Firefox\browser\features\loop@mozilla.org.xpi
    1478783285191 addons.xpi DEBUG Calling bootstrap method startup on loop@mozilla.org version 1.3.2
    1478783285225 addons.manager DEBUG Registering shutdown blocker for XPIProvider
    1478783285225 addons.manager DEBUG Provider finished startup: XPIProvider
    1478783285225 addons.manager DEBUG Starting provider: LightweightThemeManager
    1478783285225 addons.manager DEBUG Registering shutdown blocker for LightweightThemeManager
    1478783285226 addons.manager DEBUG Provider finished startup: LightweightThemeManager
    1478783285226 addons.manager DEBUG Starting provider: GMPProvider
    1478783285239 addons.manager DEBUG Registering shutdown blocker for GMPProvider
    1478783285240 addons.manager DEBUG Provider finished startup: GMPProvider
    1478783285240 addons.manager DEBUG Starting provider: PluginProvider
    1478783285240 addons.manager DEBUG Registering shutdown blocker for PluginProvider
    1478783285240 addons.manager DEBUG Provider finished startup: PluginProvider
    1478783285241 addons.manager DEBUG Completed startup sequence
    1478783286134 addons.manager DEBUG Starting provider:
    1478783286134 addons.manager DEBUG Registering shutdown blocker for
    1478783286134 addons.manager DEBUG Provider finished startup:
    1478783286599 DeferredSave.extensions.json DEBUG Write succeeded
    1478783286599 addons.xpi-utils DEBUG XPI Database saved, setting schema version preference to 17
    1478783286600 DeferredSave.extensions.json DEBUG Starting timer
    1478783286622 DeferredSave.extensions.json DEBUG Starting write
    1478783286636 addons.repository DEBUG No addons.json found.
    1478783286636 DeferredSave.addons.json DEBUG Save changes
    1478783286640 DeferredSave.addons.json DEBUG Starting timer
    1478783286802 addons.manager DEBUG Starting provider: PreviousExperimentProvider
    1478783286803 addons.manager DEBUG Registering shutdown blocker for PreviousExperimentProvider
    1478783286803 addons.manager DEBUG Provider finished startup: PreviousExperimentProvider
    1478783286808 DeferredSave.addons.json DEBUG Starting write
    1478783286827 DeferredSave.extensions.json DEBUG Write succeeded
    1478783286849 DeferredSave.addons.json DEBUG Write succeeded

    Command duration or timeout: 47.34 seconds
    Build info: version: ‘unknown’, revision: ‘unknown’, time: ‘unknown’
    System info: host: ‘IE3BLT320HG32’, ip: ‘199.63.245.172’, os.name: ‘Windows 7’, os.arch: ‘amd64’, os.version: ‘6.1’, java.version: ‘1.8.0_92’
    Driver info: org.openqa.selenium.remote.RemoteWebDriver
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
    at java.lang.reflect.Constructor.newInstance(Unknown Source)
    at org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:206)
    at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:158)
    at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:678)
    at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:249)
    at org.openqa.selenium.remote.RemoteWebDriver.(RemoteWebDriver.java:131)
    at org.openqa.selenium.remote.RemoteWebDriver.(RemoteWebDriver.java:158)
    at com.alerton.webUITest.framework.WebUITest.runTest(WebUITest.java:414)
    at com.honeywell.testNG.AlertScenario.CreateAlert(AlertScenario.java:45)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:84)
    at org.testng.internal.Invoker.invokeMethod(Invoker.java:714)
    at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:901)
    at org.testng.internal.TestMethodWithDataProviderMethodWorker.call(TestMethodWithDataProviderMethodWorker.java:73)
    at org.testng.internal.TestMethodWithDataProviderMethodWorker.call(TestMethodWithDataProviderMethodWorker.java:14)
    at java.util.concurrent.FutureTask.run(Unknown Source)
    at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
    at java.util.concurrent.FutureTask.run(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)
    Caused by: org.openqa.selenium.remote.ErrorHandler$UnknownServerException: Unable to connect to host 127.0.0.1 on port 7055 after 45000 ms. Firefox console output:
    R2mcL”,”location”:”winreg-app-global”,”version”:”15.1.0″,”type”:”extension”,”internalName”:null,”updateURL”:null,”updateKey”:null,”optionsURL”:null,”optionsType”:null,”aboutURL”:null,”icons”:{},”iconURL”:”chrome://vscore/content/ScriptFF.gif”,”icon64URL”:null,”defaultLocale”:{“name”:”McAfee ScriptScan for Firefox”,”description”:null,”creator”:”McAfee, Inc.”,”homepageURL”:null},”visible”:true,”active”:false,”userDisabled”:true,”appDisabled”:false,”descriptor”:”C:\\Program Files (x86)\\Common Files\\McAfee\\SystemCore”,”installDate”:1467185199696,”updateDate”:1467185199696,”applyBackgroundUpdates”:1,”bootstrap”:false,”skinnable”:false,”size”:2090442,”sourceURI”:null,”releaseNotesURI”:null,”softDisabled”:false,”foreignInstall”:true,”hasBinaryComponents”:false,”strictCompatibility”:false,”locales”:[],”targetApplications”:[{“id”:”{ec8030f7-c20a-464f-9b0e-13a3a9e97384}”,”minVersion”:”1.5″,”maxVersion”:”9.9″}],”targetPlatforms”:[],”multiprocessCompatible”:false,”signedState”:0,”seen”:true}
    1478783285166 DeferredSave.extensions.json DEBUG Save changes
    1478783285166 addons.xpi DEBUG Updating database with changes to installed add-ons
    1478783285166 addons.xpi-utils DEBUG Updating add-on states
    1478783285175 addons.xpi-utils DEBUG Writing add-ons list
    1478783285186 addons.xpi DEBUG Registering manifest for C:\Program Files (x86)\Mozilla Firefox\browser\features\e10srollout@mozilla.org.xpi
    1478783285187 addons.xpi DEBUG Calling bootstrap method startup on e10srollout@mozilla.org version 1.0
    1478783285187 addons.xpi DEBUG Registering manifest for C:\Program Files (x86)\Mozilla Firefox\browser\features\firefox@getpocket.com.xpi
    1478783285188 addons.xpi DEBUG Calling bootstrap method startup on firefox@getpocket.com version 1.0.2
    1478783285189 addons.xpi DEBUG Registering manifest for C:\Program Files (x86)\Mozilla Firefox\browser\features\loop@mozilla.org.xpi
    1478783285191 addons.xpi DEBUG Calling bootstrap method startup on loop@mozilla.org version 1.3.2
    1478783285225 addons.manager DEBUG Registering shutdown blocker for XPIProvider
    1478783285225 addons.manager DEBUG Provider finished startup: XPIProvider
    1478783285225 addons.manager DEBUG Starting provider: LightweightThemeManager
    1478783285225 addons.manager DEBUG Registering shutdown blocker for LightweightThemeManager
    1478783285226 addons.manager DEBUG Provider finished startup: LightweightThemeManager
    1478783285226 addons.manager DEBUG Starting provider: GMPProvider
    1478783285239 addons.manager DEBUG Registering shutdown blocker for GMPProvider
    1478783285240 addons.manager DEBUG Provider finished startup: GMPProvider
    1478783285240 addons.manager DEBUG Starting provider: PluginProvider
    1478783285240 addons.manager DEBUG Registering shutdown blocker for PluginProvider
    1478783285240 addons.manager DEBUG Provider finished startup: PluginProvider
    1478783285241 addons.manager DEBUG Completed startup sequence
    1478783286134 addons.manager DEBUG Starting provider:
    1478783286134 addons.manager DEBUG Registering shutdown blocker for
    1478783286134 addons.manager DEBUG Provider finished startup:
    1478783286599 DeferredSave.extensions.json DEBUG Write succeeded
    1478783286599 addons.xpi-utils DEBUG XPI Database saved, setting schema version preference to 17
    1478783286600 DeferredSave.extensions.json DEBUG Starting timer
    1478783286622 DeferredSave.extensions.json DEBUG Starting write
    1478783286636 addons.repository DEBUG No addons.json found.
    1478783286636 DeferredSave.addons.json DEBUG Save changes
    1478783286640 DeferredSave.addons.json DEBUG Starting timer
    1478783286802 addons.manager DEBUG Starting provider: PreviousExperimentProvider
    1478783286803 addons.manager DEBUG Registering shutdown blocker for PreviousExperimentProvider
    1478783286803 addons.manager DEBUG Provider finished startup: PreviousExperimentProvider
    1478783286808 DeferredSave.addons.json DEBUG Starting write
    1478783286827 DeferredSave.extensions.json DEBUG Write succeeded
    1478783286849 DeferredSave.addons.json DEBUG Write succeeded

    Build info: version: ‘unknown’, revision: ‘unknown’, time: ‘unknown’
    System info: host: ‘IE3BLT320HG32’, ip: ‘199.63.245.172’, os.name: ‘Windows 7’, os.arch: ‘amd64’, os.version: ‘6.1’, java.version: ‘1.8.0_92’
    Driver info: driver.version: FirefoxDriver
    at org.openqa.selenium.firefox.internal.NewProfileExtensionConnection.start(NewProfileExtensionConnection.java:112)
    at org.openqa.selenium.firefox.FirefoxDriver.startClient(FirefoxDriver.java:271)
    at org.openqa.selenium.remote.RemoteWebDriver.(RemoteWebDriver.java:119)
    at org.openqa.selenium.firefox.FirefoxDriver.(FirefoxDriver.java:218)
    at org.openqa.selenium.firefox.FirefoxDriver.(FirefoxDriver.java:211)
    at org.openqa.selenium.firefox.FirefoxDriver.(FirefoxDriver.java:129)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
    at java.lang.reflect.Constructor.newInstance(Unknown Source)
    at org.openqa.selenium.remote.server.FirefoxDriverProvider.callConstructor(FirefoxDriverProvider.java:91)
    at org.openqa.selenium.remote.server.FirefoxDriverProvider.newInstance(FirefoxDriverProvider.java:68)
    at org.openqa.selenium.remote.server.DefaultDriverFactory.newInstance(DefaultDriverFactory.java:60)
    at org.openqa.selenium.remote.server.DefaultSession$BrowserCreator.call(DefaultSession.java:222)
    at org.openqa.selenium.remote.server.DefaultSession$BrowserCreator.call(DefaultSession.java:1)
    at java.util.concurrent.FutureTask.run(Unknown Source)
    at org.openqa.selenium.remote.server.DefaultSession$1.run(DefaultSession.java:176)
    … 3 more

    i am used selenium version
    compile ‘org.seleniumhq.selenium:selenium-java:2.53.1’
    compile ‘org.seleniumhq.selenium:selenium-server:2.53.1’

    and browser version 47.0.1
    then browser is open but test case not execute

  5. rohit tiwari says:

    Selenium 2.53.1 is not compatible with Firefox 47.0.1 its open only Browser but not execute Test case. please provied me some solution .

  6. Chinmay Agrawal says:

    Which version of firefox is compatible with selenium webdriver? I am using selenium 2.53.1 drivers with Firefox version 50.0.2 and getting following message:
    “Accesibility support is partially disabled due to compatibility issues with new Firefox issues”

    Can you please help me with this?

  7. Jonatan says:

    Great article – thank you!
    It allowed me to find the right version of Selenium supporting Firefox 47 without using GeckoDriver 🙂

    Info for readers: starting from Firefox 48 you have to use GeckoDriver (which is not yet fully functional). See more explanation here: https://seleniumhq.wordpress.com/2016/10/04/selenium-3-is-coming/

Leave a Reply

Your email address will not be published. Required fields are marked *