Software Testing

Selenium 4 New Features

Selenium 4 New Features

Selenium 4 is the latest version of the popular automation testing framework, bringing several enhancements and new features to improve the efficiency of web automation. It is designed to provide better support for modern web applications by adopting the latest web standards. With Selenium 4, testers can experience improved browser automation, new locator strategies, and better debugging capabilities.

New Features

Selenium 4 new features are as follows:

Feature Description
Adoption of W3C WebDriver Selenium 4 fully adopts the W3C WebDriver standard, ensuring better browser compatibility and stability.
Relative Locators(Friendly Locators) Selenium 4 allows locating web elements based on their position relative to other elements (e.g., above(), below(), near()).
Pinned Scripts Enables execution of JavaScript snippets directly on the browser for faster automation.
Shadow DOM Support Provides better handling of web components built using Shadow DOM, which was challenging in previous versions.
Chrome DevTools Protocol (CDP) Integrates with Chrome DevTools to allow network interception, performance analysis, and console log capturing.
WebDriver BiDi Selenium 4 introduces bidirectional communication between the browser and Selenium, enabling real-time event capturing.
Selenium Grid 4 UI Enhancements Selenium Grid 4 introduced several UI enhancements compared to its predecessor, Selenium Grid 3. These improvements are part of a broader modernization effort in Selenium 4, focusing on usability and ease of configuration.

 

Selenium Grid 4 Enhanced UI

 

Selenium 4 New Features Grid

Selenium Tutorials

Selenium WebDriver Tutorials on this website can be found at: