Selenium 4.42.0: Update Overview

SeleniumHQ has released selenium-4.42.0, bringing a series of targeted enhancements and fixes across its language bindings and core components. This update focuses on refining existing functionalities and improving the developer experience for QA engineers.

TL;DR

  • Significant BiDi protocol enhancements, particularly for .NET and Java.
  • Selenium Grid introduces a transparent TCP tunnel for WebSocket data path.
  • Numerous language-specific fixes and stability improvements across Java, Python, and .NET.

Key Changes

This release delivers improvements across various components:

  • BiDi Protocol Refinements: The .NET binding sees extensive work on the BiDi protocol, including unifying event arguments, exposing functionality via interfaces, and robust handling of websocket close handshakes. Java also gains the speculation module for BiDi, expanding advanced browser interaction capabilities.
  • Selenium Grid Optimization: A notable update for distributed testing setups is the Grid router’s ability to bypass WebSocket data paths via a transparent TCP tunnel. This can lead to more efficient communication within your Grid infrastructure. For more on distributed testing, see our article on Selenium Grid 4 for distributed testing.
  • Language-Specific Improvements:
    • Java: Enhancements include improved screenshot error messages, fixes for RemoteWebDriver.builder() serialization issues, better nullability specifications, and fluent setters in various classes. The Keys enum also sees deduplication and aliasing for OPTION and ALT.
    • Python: Type annotations have been added to execute_script and execute_async_script, improving code clarity and maintainability.
    • .NET: Beyond BiDi, any WebDriver can now be disposed asynchronously, and further stability fixes for BiDi components have been implemented.
    • Node.js: A new Color Class has been introduced.

Impact for QA Teams

QA teams will find selenium-4.42.0 offers increased stability and clearer debugging information, especially with Java’s enhanced error messages. The BiDi protocol advancements open new avenues for complex browser automation scenarios, while Grid’s routing improvements can optimize distributed test execution. These updates contribute to a more reliable and efficient test automation framework, making it a valuable update for those tracking the relevance of Selenium WebDriver in 2025.