Change8

selenium-4.28.0

Breaking Changes
📦 seleniumView on GitHub →
1 breaking14 features🐛 18 fixes1 deprecations🔧 22 symbols

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.

⚠️ Breaking Changes

  • 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

  1. Enable nullable reference types in your .NET project (add <Nullable>enable</Nullable> to the csproj) to take advantage of the new nullability annotations.
  2. Update NUnit assertions to the Assert.That syntax as recommended in the .NET migration notes.
  3. Replace any usage of IWebDriver.GetAttribute with WebElement.GetAttribute or the new API to avoid deprecation warnings.
  4. If you rely on the old packaging layout for Python, switch to the new pyproject.toml configuration.
  5. Review and adjust imports for the typing package enhancements in Python code.
  6. For Java projects, use the new getter for additionalCommands and the setter for JsonInput.readPerformed where applicable.
  7. If you use Selenium Grid, ensure your node implementation handles the NodeRestartedEvent as the distributor now listens for it.

✨ New Features

  • Added execute_cdp_cmd method to Remote in the Python bindings.
  • Added BiDi Network request handlers (add_request_handler, remove_request_handler, clear_request_handlers) in the Ruby bindings.
  • Implemented xz uncompressor for Firefox Linux nightlies in the Rust driver.
  • Added static locators.html file to the Selenium web pages.
  • Improved Selenium Manager edge artifact deserialization handling.
  • Encapsulated additionalCommands with a getter method in the Java bindings.
  • Provided a setter for JsonInput.readPerformed flag in Java.
  • Enhanced span naming for TracedCommandExecutor in Java.
  • Moved Rust binary settings to pyproject.toml for Python packaging.
  • Converted lambdas to method references in Java codebase.
  • Added future‑proofing note on Base64UrlEncoder in .NET.
  • Added nullability annotations to many .NET types (ShadowRoot, Platform, Proxy, CookieJar, Alert, SessionId, Logs API, Response, etc.).
  • Enabled SpotBugs exclusions for several false‑positive patterns in Java.
  • Added tests for cookie name handling and updated Hash return value documentation in Ruby.

🐛 Bug Fixes

  • Fixed pyproject.toml for installable from sdist (Python).
  • Fixed packaging issues in the Python distribution.
  • Fixed Virtual Authenticator removal handling in .NET.
  • Fixed WebDriver.AuthenticatorId property in .NET.
  • Fixed edge artifact deserialization in Selenium Manager.
  • Decremented the connection‑per‑session counter on session close in Grid.
  • Addressed warnings with ActionSequence.inputDevice in .NET.
  • Corrected assertion of struct type in internal .NET tests.
  • Fixed internal logging warnings in .NET.
  • Refactored away private constructor from Response type in .NET.
  • Fixed SpotBugs issue NP_NULL_ON_SOME_PATH_FROM_RETURN_VALUE in Firefox extension handling (Java).
  • Fixed SpotBugs issue DMI_HARDCODED_ABSOLUTE_FILENAME (Java).
  • Fixed SpotBugs issue IS2_INCONSISTENT_SYNC in SeleniumManager (Java).
  • Fixed edge artifact deserialization bug (Selenium Manager).
  • Fixed race condition in Rust cache by using file lock.
  • Updated CI script pinned_browsers for Edge API changes.
  • Bumped Bazel rules_jvm_external to 6.6 and switched to Maven resolver.
  • Bumped Bazel rules_protobuf and rules_closure to avoid namespace warnings.

🔧 Affected Symbols

IWebDriver.GetAttributeWebDriver.AuthenticatorIdShadowRootPlatformBase64UrlEncoderOpenQA.Selenium.InternalActionSequence.inputDeviceProxyResponseLogs APICookieJarAlertSessionIdadditionalCommandsJsonInput.readPerformedTracedCommandExecutorexecute_cdp_cmdfedcm.account (descriptor object)locators.htmlSeleniumManager edge artifact handlingGrid connection per session counterRust cache lock

⚡ Deprecations

  • The GetAttribute method on IWebDriver is deprecated (obsoleted) in the .NET bindings.