Migrating to Selenium selenium-4.28.0
Version selenium-4.28.0 introduces 1 breaking change. This guide details how to update your code.
Released: 1/20/2025
1
Breaking Changes
7
Migration Steps
22
Affected Symbols
⚠️ Check Your Code
If you use any of these symbols, you need to read this guide:
IWebDriver.GetAttributeWebDriver.AuthenticatorIdShadowRootPlatformBase64UrlEncoderOpenQA.Selenium.InternalActionSequence.inputDeviceProxyResponseLogs APICookieJarAlertSessionIdadditionalCommandsJsonInput.readPerformedTracedCommandExecutorexecute_cdp_cmdfedcm.account (descriptor object)locators.htmlSeleniumManager edge artifact handlingGrid connection per session counterRust cache lockBreaking Changes
●Issue #1
IWebDriver.GetAttribute is now marked obsolete in the .NET bindings; existing code that calls this method will receive a compilation error or warning. Replace calls with WebElement.GetAttribute or the new recommended API.
Migration Steps
- 1Enable nullable reference types in your .NET project (add <Nullable>enable</Nullable> to the csproj) to take advantage of the new nullability annotations.
- 2Update NUnit assertions to the Assert.That syntax as recommended in the .NET migration notes.
- 3Replace any usage of IWebDriver.GetAttribute with WebElement.GetAttribute or the new API to avoid deprecation warnings.
- 4If you rely on the old packaging layout for Python, switch to the new pyproject.toml configuration.
- 5Review and adjust imports for the typing package enhancements in Python code.
- 6For Java projects, use the new getter for additionalCommands and the setter for JsonInput.readPerformed where applicable.
- 7If you use Selenium Grid, ensure your node implementation handles the NodeRestartedEvent as the distributor now listens for it.
Release Summary
This release adds numerous nullability annotations, new API methods (e.g., execute_cdp_cmd, BiDi Network handlers), several bug fixes, and updates to build dependencies, while deprecating IWebDriver.GetAttribute in the .NET bindings.
Need More Details?
View the full release notes and all changes for Selenium selenium-4.28.0.
View Full Changelog