Selenium Simplified - Automated Browser Testing With Selenium WebDriver Made Simple

Jun 30, 2016 - 2 minute read - Selenium Simplified Blog WebDriver

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