Is it safe to upgrade to Selenium WebDriver 3? Yes!

By Zhimin Zhan

Selenium WebDriver 3 was released three days ago! Since there is 5 years between versions 2 and 3, a lot changes are expected in this major release. For teams with existing test suite, here comes the question:

  • Will there will be a lot of work to upgrade existing test scripts to Selenium WebDriver 3?

My short answer: Selenium WebDriver 3 is a drop-in replacement for Selenium WebDriver 2.53. As I am a test engineer, my statement is backed by testing. I executed my test suite for ClinicWise : 520 user story level Selenium WebDriver test scripts in Ruby.

Before the testing, I upgraded Chrome to the latest version 2.54 and BuildWise Agent1.7 with latest Selenium-WebDriver 3.0 gem (the latest chromedriver 2.24 is embedded in BuildWise Agent).

I triggered a build to run all tests (not changed) in BuildWise, which distributed these 520 tests to 6 BuildWise Agents to run them in parallel. Here is the result:

All tests pass. In terms of performance, I couldn't compare precisely because test scripts were assigned to different build machines. Overall, it seemed slightly faster.

For my another test suite for SiteWise (the content management system I developed), I did find an issue: a test failure on file uploading in a modal dialog within SummerNote editor.

 Failure/Error: insert_image_modal_page.select_file(test_file("green_lamp.jpg"))

  Selenium::WebDriver::Error::UnknownError:
    unknown error: cannot determine loading status
    from unknown error: missing 9aea000394714d2fbb20850021f6204f2256b9cf),platform=Windows NT 6.1.7601 SP1 x86_64)
     # ./vendor/source/selenium-webdriver-3.0.0/lib/selenium/webdriver/remote/response.rb:69:in `assert_ok'
     # ./vendor/source/selenium-webdriver-3.0.0/lib/selenium/webdriver/remote/response.rb:32:in `initialize'

However, I believe this is an issue with the chromedriver with Chrome 54. The test passed with Chrome 53.

My suggestion: before upgrading to Selenium WebDriver, make sure test execution of your test suite is reliable (it is easier to say than getting it done, I know) and lock down the version of Browser and WebDriver (such as chromedriver). Then upgrade.