Move Over, Selenium 2: Why It’s Time to Upgrade to Selenium 3

Posted Mar 30th, 2017

Move over, Selenium 2. It's time to upgrade to Selenium 3.

I have always been an early adopter. I can't help it. So it’s hard to believe it has been about six months since Selenium 3 released its first beta version, and that I’ve only recently been able to take it for a test drive.

The upgrade from Selenium 2 to Selenium 3 was practically effortless. (I recommend that people start a proof of concept project to demonstrate that Selenium 3 works with their existing suite of automated tests.) I expect your project may require some tweaking, and then you'll be up and running again. Take some time to explore all the new features, review known issues, and what is on the roadmap for Selenium 3. At the end of the day, you will need to evaluate if the upgrade is feasible and that it will not break your current Selenium testing project.

What’s New and What’s Changed with Selenium 3

Any major version change typically means significant additions in functionality, or interface changes. It is important to review the release notes before upgrading your test suites blindly. After hours of reading Selenium release notes, reading blogs, and viewing a webinar by Simon Stewart, the Selenium Project Lead, I have a better understanding of what has changed with the Selenium 3 release. It’s possible that I overlooked something, but here is a compiled list of changes I took note of:

  • Java 8 is required.
  • The original Selenium Core will be retired, which has a significant impact for teams.
  • The Selenium RC APIs have been moved to a “legacy” package, a.k.a. leg-rc
  • The support for browser drivers has changed.
  • Upgrading to Selenium 3 no longer supports the default Mozilla Firefox browser—now onwards to Mozilla's geckodriver
  • Safari browser is provided on macOS (Sierra 10.12 or later), and Apple owns the safaridriver.
  • Selenium project will no longer maintain the OSS SafariDriver once Safari 10 ships.
  • Edge browser is provided by Microsoft from their webdriver server.
  • IE versions 9 or above are supported.
  • Evolving W3C webdriver specification
  • Stability fixes for Selenium Grid
  • Bug fixes

Since day one, the Selenium project has been responsible for providing the webdriver for each browser. (A massive effort by non-paid project contributors maintains the webdriver for each browser.)

Now, the major browser vendors (Google Chrome, Apple Safari, Microsoft Edge, and Mozilla Firefox) are shipping their own implementation of the webdriver. This change makes complete sense, as the browser vendors understand their product better than anyone else, and have full access to the source code. The movement benefits all Selenium users now that browser vendors are eating their own dog food! (“Eating your own dog food” means that a company is using its own products or services for internal operation. In this case, I hope they are developing Selenium end-to-end tests to validate their own webdriver implementation.)

On the Roadmap—W3C Spec

A future Selenium release is already in motion. The Selenium team has been working hard on getting an official webdriver specification published by W3C.

W3C develops common protocols, guidelines, and open standards that ensure long-term growth for the Web will evolve in the same direction, rather than splitting in different directions. We need W3C webdriver specification because browsers are complex, and delivering a rock-solid specification that all browser vendors must follow will have a positive impact on the testing community. Browser vendors which own their drivers must prepare for future W3C published webdriver specifications.

Why It’s Time to Upgrade

It’s critical that Selenium Core users start planning a strategy for upgrading to the latest version of Selenium, and start using the webdriver API. For the testing community using the Selenium webdriver API, it will be a seamless upgrade from Selenium 2.53.1 to Selenium 3.x.x. (The biggest change for me was downloading geckodriver for local testing.) And it has been a smooth transition for remote testing using Sauce Labs.

Sauce Labs Platform and Browser Compatibility with Selenium 3

Windows 10
MacOS 10.11
MacOS 10.12
Edge 14.14393 >=
Chrome 53 >=
Firefox 49 >=
IE v 11.103 >=
Safari 9.0
MacOS 10.12 Safari 10.0

The advantages of upgrading include some bug fixes, improved stability, browser vendors starting to own implementation of their own drivers, and more. If you encounter any issues with Selenium 3, I recommend checking out the reported Selenium GitHub issues for the project.


Finally, I highly recommend you start planning ahead before beginning the upgrade to Selenium 3 to flush out any issues that could impact your testing. (I certainly could have missed something in this discussion that could affect your Selenium infrastructure.)

I want to thank the Selenium team and contributors for all the hard work to make Selenium 3 possible, and thank them for their ongoing work towards W3C webdriver specification.

Greg Sypolt (@gregsypolt) is a Senior Engineer at Gannett – USA Today Network and co-founder of Quality Element. He has spent most of his career working as a developer in test— concentrating on automated testing for web browsers, APIs, mobile, and more. He is focused on the research, creation, and deployment of automated test strategies, testing frameworks, tools, and continuous integration. He is passionate about #TestAutomation #TestCoverage #ContinuousIntegration #DevOps

Written by

Greg Sypolt