Our Thoughts
Sonam Chaturvedi
QA Technical Lead
13 October, 2021 2 MIN READ

Everything you need to know about Selenium 4

13 October, 2021 2 MIN READ
Sonam Chaturvedi
QA Technical Lead

Ever since Selenium 4 was announced in August 2018, the QA testing world was excited and thrilled for the latest enhancement of a QA tester’s best tool. On October 13, 2021, the stable Selenium 4 was officially released after the release of its Alpha and Beta versions. The exciting new features of Selenium 4 are way beyond what anyone could have anticipated and in this blog, this is exactly what we’re going to cover. 


New Features

We have explored these new features in our series blogs with code snippets.

  • Relative Locators

Relative locators is the new feature introduced in Selenium 4 to locate WebElements relative to other elements. To deep dive, visit our blog on relative locators.

  • Screenshots

Selenium 4 provides the capability to capture screenshots at different UI levels - element, Section, Full Page. In the screenshots blog, we have covered why we need this feature and how we can achieve it in Selenium 4, with example codes.

  • Window Handling

With Selenium 4, we have a new API to handle the opening of new windows/tabs and switching between windows during test execution. Visit our blog to understand how working with Windows has changed from Selenium 3 to Selenium 4.

  • Chrome DevTools Protocol

Native support for Chrome DevTools Protocol is one of the major Selenium 4 features. You can refer to this blog to learn more about the implementation of CDP in detail.

  • Deprecated, Modified and New Methods

With the introduction of new features, there has been deprecation and modification of methods on Selenium 4. Explore them in this article.

Note: Find the sample code snippets for these features in the GitHub repository here.



Have you tried Selenium 4? If yes, do let us know what features you liked the most, along with the overall experience of working with Selenium 4!


Happy Testing !!!


Sonam Chaturvedi