Over a million developers have joined DZone.

Migrating to Selenium 3

DZone's Guide to

Migrating to Selenium 3

Selenium 3 promises to be a drop in replacement for version 2. But how well does that claim hold up in practice?

· Web Dev Zone
Free Resource

Add user login and MFA to your next project in minutes. Create a free Okta developer account, drop in one of our SDKs to your application and get back to building.

Selenium has just released version 3. This is a major version bump from the last release of 2.53, but the Selenium developers have made assurances that anyone using the WebDriver API will be able to use version 3 as a drop-in replacement for version 2. So how do those claims hold up?

I’ve used WebDriver 2 quite extensively with the Iridium project. One thing I have learned while writing a web browser testing tool is that it pays to be up to date. New releases of browsers frequently break driver compatibility, and so it made sense to integrate to integrate Selenium 3 as soon as possible.

Iridium comes with a reasonably large test suite that has been designed to validate the basic functionality that most tests will perform on a web page. These test open pages, navigate around, click on buttons, populate text boxes and make selections from drop down lists, and they are to catch any regressions.

I’m happy to say that after upgrading to Selenium 3 (along with a few browser driver updates) I didn’t have to update even a single line of code to accommodate the new library. All the tests worked as expected, and that experience was repeated with the tests that we have written for our own internally developed web apps. It seems that Selenium 3 is indeed a drop in replacement for version 2, just as promised.

I have to congratulate the Selenium development team on a job well done, and anyone who is using the older version 2 library should definitely take a look at version 3. It is rare for a major version upgrade to be so painless.

Launch your application faster with Okta’s user management API. Register today for the free forever developer edition!

testing ,project ,selenium ,web dev

Published at DZone with permission of Matthew Casperson, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

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

{{ parent.tldr }}

{{ parent.urlSource.name }}