pypi / selenium
selenium
What changed in selenium 4, from its official release notes, upgrade guides and advisories. Sources checked 2026-10-29.
8 breaking4 deprecations
See which of these apply to your code, ranked, in your agent:
npx @unstale/cli initselenium 412 changes
Breaking changes 8
Use browserVersion instead of version in W3C-compliant capabilities.
Java timeout and wait APIs now expect Duration instead of a time and TimeUnit pair or a numeric timeout.
The Java binding utility methods for finding elements, including findElement* and findElements*, are removed; use findElement or findElements with By instead.
Merging capabilities no longer mutates the calling object; assign the result of the merge operation.
Use platformName instead of platform in W3C-compliant capabilities.
Selenium 4 requires Python 3.7 or higher.
Capabilities not in the W3C standard list need a vendor prefix, such as a cloud vendor's cloud:options block.
Selenium 4 removes support for the legacy protocol and uses the W3C WebDriver standard by default.
Deprecations 4
The C# API is deprecated; use AddAdditionalOption instead.
BrowserType is deprecated in favour of the Browser interface.
Python driver construction deprecates executable_path; pass a Service object or ensure the driver is on the System PATH.
The Firefox legacy driver option is deprecated; the notes recommend relying only on GeckoDriver.