[dotnet] Annotate nullability on elements and WebDriver
#15352
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
User description
Description
Finishes annotating nullability on
WebElement
andWebDriver
, including their related interfacesIWebElement
andIWebDriver
. Also annotates interfaces they implement, such asIJavascriptExecutor
.Motivation and Context
Contributes to #14640
Types of changes
Checklist
PR Type
Enhancement, Bug fix
Description
Annotated nullability for
WebElement
,WebDriver
, and related interfaces.Improved type safety by introducing nullable references.
Added exception handling and documentation for null-related scenarios.
Refactored code to align with nullable reference types.
Changes walkthrough 📝
12 files
Added nullability annotations and refactored script execution methods.
Updated browser path handling with nullable annotations.
Enhanced command parameter handling with nullable annotations.
Updated cookie handling with nullable annotations.
Updated Firefox driver browser path handling with nullable
annotations.
Annotated nullability for JavaScript execution methods.
Enabled nullable reference types for `IWebDriver`.
Annotated nullability for
IWebElement
attribute and property methods.Updated JavaScript execution with nullable annotations.
Refactored
WebDriver
methods with nullable annotations and improvedsafety.
Refactored
WebElement
methods with nullable annotations and improvedsafety.
Added exception handling and nullable annotations for element
creation.
1 files
Added exception documentation for element finding methods.
3 files
Added null-forgiving operator for profile directory handling.
Added null-forgiving operator for shadow root element handling.
Updated active element and window name handling with null-forgiving
operators.