Migrating to Selenium selenium-4.40.0
Version selenium-4.40.0 introduces 1 breaking change. This guide details how to update your code.
Released: 1/18/2026
⚠️ Check Your Code
If you use any of these symbols, you need to read this guide:
Emulation commands (Java BiDi)FTP proxy support (Python)WebDriverException constructor (Java)JUnit assertions (Java)WebElement.find_element(s) (Python type hints)FileHandler (macOS)Breaking Changes
●Issue #1
In Java BiDi emulation commands, the return type for emulation commands has been changed to void. Users relying on return values from these specific commands must update their code.
✓Solution
Remove any code that attempts to capture or use the return value of BiDi emulation commands that now return void.
Migration Steps
- 1If using Java BiDi emulation commands, update code to handle the new void return type.
- 2Remove usage of deprecated FTP proxy support in Python.
- 3Replace reflection usage for WebDriverException constructor with direct constructor calls (Java refactor).
- 4Replace JUnit assertions with AssertJ assertions where applicable (Java refactor).
Release Summary
This release focuses heavily on internal modernization, especially in Java (replacing Guava, refactoring assertions) and DotNet, alongside numerous stability fixes across Ruby, Python, and Bazel build systems. Key feature additions include new BiDi emulation commands for network conditions and screen orientation in Java and Python.
Need More Details?
View the full release notes and all changes for Selenium selenium-4.40.0.
View Full Changelog