Over a million developers have joined DZone.

Upgrading to Selenium 3 With My First Selenium Project

DZone's Guide to

Upgrading to Selenium 3 With My First Selenium Project

Alan Richardson provides a thorough walkthrough on how you can upgrade to the newest version of Selenium, along with a video.

· DevOps Zone ·
Free Resource

Is the concept of adopting a continuous everything model a daunting task for your fast moving business? Read this whitepaper to break down and understand one of the key pillars of this model in Continuous Governance: The Guardrails for Continuous Everything.

Selenium 3 is out and you can read the big announcement here. It's available to start using now.

I’ll be checking my course against Selenium 3 later, but for the moment, here are the steps that you need to take to upgrade.

Upgrading to Selenium 3.0

Using startUsingSeleniumWebDriver as an example.

Change the pom.xml


This becomes:



Not Quite Ta-Da

For Marionette, we need to update to the most recent version, which can be found here. Note: Version 11.0.1 was used at the time of writing.

With Selenium 3, MarionetteDriver is deprecated. My test MyFirstTestFF48 uses MarionetteDriver. I can see that MarionetteDriver is deprecated, but it still works, provided that I have Marionette Geckodriver setup correctly.

It works if I install v 11.0.1 of Marionette Driver and have it named as geckodriver.exe on the path. However, I should migrate away from using MarionetteDriver in my code because it is deprecated.

Back to FirefoxDriver

FirefoxDriver now defaults to use the Marionette driver. So I can use Marionette by running my FirefoxDriver test, which uses Selenium 3, by default. Now:

  • FirefoxDriver now uses Marionette.
  • I no longer have to rename geckodriver.exe to wires.exe
  • I now use geckodriver.exe

If you want to switch between 2.53.1 and 3.0.0, then I’d add the Marionette driver folder to the path and:

  • Have Version 0.9.0 named as wires.exe
  • Have Version 11.0.1 named as geckodriver.exe

My Firefox test, mvn test -Dtest=MyFirstTest, works if I install Version 11.0.1 of Marionette Driver and have it named as geckodriver.exe on the path and I use FirefoxDriver to instantiate the driver.

Firefox Marionette Summary:

To use Marionette geckodriver.exe for Firefox with Selenium 3:

  • Install the latest version of geckodriver.exe here.
  • Add geckodriver.exe to the path.
  • Use FirefoxDriver in your code.

Legacy Firefox?

What if you want to use the built-in FirefoxDriver, i.e., for Firefox Extended Support Release or portable Firefox? Well, you still can! You just have to:

  • Set the Firefox driver capability “Marionette” to false.
  • Set the firefox_binary capability to the path of your Legacy Firefox.

For example:

DesiredCapabilities capabilities = DesiredCapabilities.firefox();
capabilities.setCapability("marionette", false);
       new File(System.getProperty("user.dir"),
WebDriver driver = new FirefoxDriver(capabilities);

Work to Do

I have some work to do to update the startUsingSeleniumWebDriver and check my course tests against Selenium 3. If I have to update, anything I’ll blog about it.


  • Update pom.xml to use <version>3.0.0</version>.
  • Download the latest version ofgeckodriver.exe.
  • Add geckodriver.exe to the path.
  • Use FirefoxDriver in your code.
  • Set the "Marionette" capability to false if you want to use legacy FirefoxDriver.

Are you looking for greater insight into your software development value stream? Check out this whitepaper: DevOps Performance: The Importance of Measuring Throughput and Stability to see how CloudBees DevOptics can give you the visibility to improve your continuous delivery process.

selenium ,devops ,firefox ,marionette

Published at DZone with permission of

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}