Selenium and WebDriver Version Selection

This post summarized the versions of browsers and seleniums as well as the dependencies for automation test especially for headless testing.

Selenium 3

Current stable version of selenium. From Selenium 3:

  • Interacts with Firefox through Mozzila’s Gecko Driver.
  • Requests Firefox 47.1.0+ version if choosing Firefox to test (FF v47.0 is not supported).
  • Requests Java 8 (which is the oldest official Oracle Java version)
  • Works with Edge through EdgeDriver
  • Works with IE 9+ through IEDriverServer

Selenium 3 development plan was announced from 2013. However, the available beta was released by July 2016 and stable Selenium 3 was finally released Oct 2016. Google java lib Guava is also requested. A standalone selenium jar lib is offered from this release.

Headless browsers:

The classic way to run selenium based web automation test with browsers will launch browsers GUI windows. Which is slow and requests display settings (on Linux). Webkit based headless browser as Phaontomjs is a better choice when the test is table, or, executed on cloud.

Recent Firefox and Chrome releases offer headless mode which can fasten the test with less computation cost.

Browser Current versions Browser version with headless support Notes
Firefox stable:55, beta:56b, dev:57dev From v56 Need FF beta version 56b to support headless mode by set MOZ_HEADLESS=1
Chrome stable:61 Mac and Linux: from 59, Windows: from 60 Cli option “”–headless” to run chrome in headless mode (–disable-gpu might be requested on early builds)

Chrome browser headless mode requests chromedriver version newer than 2.29 due to known update. Current stable chromedriver version is 2.33. For GeckoDriver, v0.19.0 works fine with headless mode firefox.

Since phantomjs steps down as maintainer by version 2.1.1, there are other lightweight webkit or other engine based headless browser to choose. Visit headless browsers for more solutions.

Selenium 2

Selenium 2 is the history version to offer a common interface over JSON wired protocol to interact with web driver executables and through them to browsers. The communication scenario is:

For IE and Chrome:

Selenium Language Binding ⇆ Web Driver Executable ⇆ Browser

For FF without Gecko (without Marionette flavor), headless Phantomjs and HtmlUnit:

Selenium Language Binding ⇆ Browser

Since new Firefox utilizes Gecko driver, Selenium 2 works with Firefox version <=47 in stright direct interaction way.

From Selenium 2, it is called Selenium Web Driver instead of RC.

Selenium RC

Selenium Remote Control (RC) is history version which interacts with browsers by inject javascript and works as an HTTP proxy. Which requests preconfiguration on security checks for most of modern browsers but provides wide supports with language bindings and most of browsers.

Selenium Client Driver (with most languages) ⇆ Selenium Server (Jar file) ⇆ Browsers

Change Log

Nov18, 2017: Add notes on chromedriver version.
Aug13, 2017: Initial post draft.

------ End ------
Max Wu wechat
微信 WeiXin

热评文章