Introduction

Whenever a previous version of a software is upgraded, it means that you will observe some major alterations in the interface or functionality. Similar is the case with Selenium, where various new additions and upgrades can be witnessed. The Salient features of Selenium WebDriver latest version are as under.

  • Necessary bug fixes
  • The Selenium Core is obsolete
  • Java 8 is necessary
  • Selenium RC APIs moved to leg-rc (legacy” package)
  • Changes made in W3C webdriver specification
  • Selenium Grid Stability fixes

Some of the most essential features of latest Selenium WebDriver are explained as under.

1. Selenium Core is obsolete

The most noticeable change in Selenium 3.0 is the replacement of Selenium Core implementation with a WebDriver backed option. The requirements of web testing are growing in sophisticated way and are becoming more complicated with each passing day. Therefore, Selenium Core is not the right option in the prevailing era, as it is unable to meet these requirements.

2. No Browser Driver Support

Since the browser vendors have better knowledge of their browsers, the WebDriver implementations are required to be closely coupled with each of the browsers. This would definitely lead to a perfect testing experience. In order to achieve this goal, major browsers are encouraged to ship their own implementation of WebDriver. This would allow conducting your tests in a perfect manner by using the Selenium WebDriver latest version.

Browser compatibility with Selenium 3

Mozilla Mozilla’s geckodriver
Google  Chromedriver
Apple Safaridriver
Microsoft Edge/Internet Explorer

3. Code Changes to support Firefox using geckodriver

In order to work through latest firefox version by using Selenium WebDriver latest version, you have to set the system property ‘webdriver.gecko.driver’ as in case of IE [webdriver.ie.driver] and chrome [webdriver.chrome.driver]. On the contrary, other implementations regarding firefox are almost the same as we have seen in previous firefox driver provided by selenium. The code snippet is referred below.

For creating an instance remotely:

System.setProperty(“webdriver.gecko.driver”,”pathtodriver\\geckodriver.exe”);

DesiredCapabilities caps = DesiredCapabilities.firefox();

caps.setCapability(“marionette”, true);

WebDriver driver = new RemoteWebDriver(caps);

driver.get(“https://www.google.co.in”);

System.out.println(“Title: ” + driver.getTitle());

driver.quit();

For creating an instance locally:

System.setProperty(“webdriver.gecko.driver”,”pathtodriver\\geckodriver.exe”);

WebDriver driver = new FirefoxDriver();

driver.get(“https://www.google.co.in”);

System.out.println(“Title: ” + driver.getTitle());

driver.quit();

4. Selenium IDE Exported Script

For those who use selenium IDE for writing the code and exporting it in table format for the sake of execution, they must need to use new test runner for this purpose. Selenium Html Runner is a viable option and you can easily download the same through official website of Selenium.

5. Integrated W3C WebDriver

The Selenium WebDriver latest version offers the integration of a W3C WebDriver specification, which is being used for automation. It was considered as a relevant tool during mobile testing via iOS and Appium Driver. This particular feature would enhance the compatibility across various software implementations of the WebDriver.

The basic reason of this update was not related to the cause of introducing massive changes to the regular use of Selenium. On the other hand, it was done with a view to provide an alternative to the old RC interfaces and to meet the requirements of ever advancing web testing environment.

Conclusion

Selenium 3.0 is a much-needed release, as the browser automation has entered into an exciting era. The developers are working hard to introduce relevant features and track the existing W3C specifications. The features of Selenium WebDriver latest version are in line with the goal of keeping the need of making changes to the tests at its minimum and preserving your hard work associated with the existing tests.

Pin It on Pinterest

Shares
Share This