Site Loader
Auckland, New Zealand

In this article we will discuss, everything you need to know about Selenium 4 features, updates and changes coming later this year or early next year to general public, while Selenium 4 is currently in alpha-3 version.

Selenium History

Before discussing about Selenium 4 features and updates, lets discuss about the Selenium History

Selenium History

Selenium RC – Released all the way back in year 2007 was very less in support with browsers and majorly HTMLUnitDriver was used during that time.

Selenium WebDriver – Release as early version on 2009 by Simons Stewart, the version gained the first ever feature to work with browsers along with JS support directly, which makes most of the modern browswers to work with Selenium WebDriver.

Then on 2011 and 2016 Selenium 2 and 3 released repectively and gained so much popularity among community and browser maker such as IE, Firefox, Safari, Chrome and you name it. Many companies started using Selenium Webdriver as the core and built wrapper around it, to leverage the power of Selenium for browser automation. And some popular third party softwares which has leveraged Selenium as the core such as TestProject, Katalon Studio, Testim, Test Complete etc.

Selenium 4 – Alpha 3

Selenium 4 announced on 24/04/19 has got many new features since then. Starting from Selenium Alpha 1 through 3, some of the most noticeable features are

  • Improved Docker support
  • Support of Chrome Edge for Microsoft browser
  • No more JSON wire protocol, native support of W3C standard
  • Support of Relative Locator finally !
  • Support of ChromeDevTool with new API which will help us get ApplicationCache, Fetch, Network, Performance, Profiler, ResourceTiming, Security and Target CDP domains

Misc

  • Support to work with different browser window same time
  • Support to identify parent frame directly

Chrome and Edge Driver now has ChromiumDriver as base class

Until Selenium 3, both EdgeDriver and ChromeDriver has their own implementation and inherit from RemoteWebDriver, but with Selenium 4, both EdgeDriver and ChromDriver inherit from ChromiumDriver which inturn inherit from RemoteWebDriver, and this has brought following new method implementions as shown below and we are going to discuss majorly about getDevTools() method

Relative Locators

Relative locators are way to identify UI controls based on relative locators as opposed to the exact locators which we were using all these days as shown below. As you can see in the examples below, to identify the highlighted checkbox English we can use relative locators such as checkbox “Hindi” and option button “Male” as the relative locators. And similarly to identify textbox Initial we can use relative locators “Title” drop down box and “FirstName” textbox.

Working with different browser window same time

With Selenium 4, we now have the ability to navigate two different browser windows or tabs same time with two different sessions out of box, which was not the case until Selenium 3 as shown below

Chrome Dev Tools support

Chrome Dev Tools are supported out-of-box in Selenium 4 and you can see all the features here in the library org.openqa.selenium.devtools , with this, you can gain access to all the ChromeDevTools features such as

  • Application Cache
  • Fetch
  • Inspector
  • Network
  • Performance
  • Target
  • Console and
  • Security etc

Here is the complete video of the above discussion

Once again, thank you very much for watching the video and reading the article

Post Author: Karthik kk

Leave a Reply

Your email address will not be published. Required fields are marked *