Migrating to Selenium selenium-4.30.0
Version selenium-4.30.0 introduces 4 breaking changes. This guide details how to update your code.
Released: 3/21/2025
⚠️ Check Your Code
If you use any of these symbols, you need to read this guide:
SystemClockWebDriver.SessionIdDriverFinderCDP generated codeRemoteValueLocalValueScript.LocalValue.MapPartitionDescriptorUrlPatternScript.TargetLogEntryBytesValueActionsProxyConfigurationLocatorClipRectangleRealmInfoOriginBrokerSetFiles commandUnhandledPromptBehaviorBy class attributesexpected_conditionsWebElementCapabilitiesDriverServiceBreaking Changes
●Issue #1
Removed obsolete members and types for .NET 4.30; code referencing these members must be updated to use the new APIs.
●Issue #2
Enabled Nullable Reference Types across the .NET bindings; projects must enable nullable context or adjust code to handle nullable warnings.
●Issue #3
Made many BiDi types (e.g., LocalValue, RemoteValue, PartitionDescriptor, UrlPattern, Script.Target, LogEntry, BytesValue, Actions, ProxyConfiguration, Locator, ClipRectangle, RealmInfo, Origin) non-nested, changing their namespace and type names; update imports and usage accordingly.
●Issue #4
Trimmed CDP support when publishing AOT apps, which removes CDP assemblies from the published output; applications relying on CDP at runtime need to include them manually.
Migration Steps
- 1Replace any removed obsolete .NET members/types with their recommended replacements as listed in the 4.30 release notes.
- 2Enable nullable reference types in your .NET project (add <Nullable>enable</Nullable> to the csproj) or annotate your code to handle possible null values.
- 3Update imports and object constructions for BiDi types that were made non-nested (e.g., use Selenium.BiDi.RemoteValue instead of Selenium.BiDi.LocalValue.RemoteValue).
- 4If publishing AOT apps, manually include required CDP assemblies or disable the trimming option.
- 5Adjust Python code to use the By class attributes (By.ID, By.NAME, etc.) instead of raw string locators.
- 6Review and update any custom scripts that rely on the previous nested BiDi type hierarchy.
Release Summary
Selenium 4.30 introduces extensive .NET nullability annotations, removes obsolete members, and adds numerous BiDi and Grid features while fixing a wide range of bugs across all language bindings.
Need More Details?
View the full release notes and all changes for Selenium selenium-4.30.0.
View Full Changelog