-
-
Notifications
You must be signed in to change notification settings - Fork 8.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[dotnet] Start adding nullable reference type annotations to the Support
package
#14779
base: trunk
Are you sure you want to change the base?
Conversation
@@ -40,8 +40,14 @@ public class EventFiringWebDriverTest | |||
public void Setup() | |||
{ | |||
mockDriver = new Mock<IWebDriver>(); | |||
mockElement = new Mock<IWebElement>(); | |||
mockShadowRoot = new Mock<ISearchContext>(); | |||
mockElement = new Mock<IWebElement>() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The null checks found a hole in the mocking, these changes are necessary to make those tests pass.
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
Support
package
PR Code Suggestions ✨Explore these optional code suggestions:
|
Even don't spend your time on |
@nvborisenko I get it 😁 But it's so small, and so simple to get it working. This PR does most of the work. The |
User description
Thanks for contributing to Selenium!
A PR well described will help maintainers to quickly review and merge it
Before submitting your PR, please check our contributing guidelines.
Avoid large PRs, help reviewers by making them as simple and short as possible.
Description
This implements nullable reference types and the requisite null checks (alongside some modernization) on the first half of the
support
package, as well as types in thesupport
namespace but in the regular package.Motivation and Context
Contributes to #14640
Types of changes
Checklist
PR Type
enhancement, bug_fix
Description
Changes walkthrough 📝
18 files
FindElementEventArgs.cs
Add nullability and exception handling to FindElementEventArgs
dotnet/src/support/Events/FindElementEventArgs.cs
GetShadowRootEventArgs.cs
Add nullability and exception handling to GetShadowRootEventArgs
dotnet/src/support/Events/GetShadowRootEventArgs.cs
WebDriverExceptionEventArgs.cs
Add nullability and exception handling to WebDriverExceptionEventArgs
dotnet/src/support/Events/WebDriverExceptionEventArgs.cs
WebDriverNavigationEventArgs.cs
Add nullability and exception handling to WebDriverNavigationEventArgs
dotnet/src/support/Events/WebDriverNavigationEventArgs.cs
WebDriverScriptEventArgs.cs
Add nullability and exception handling to WebDriverScriptEventArgs
dotnet/src/support/Events/WebDriverScriptEventArgs.cs
WebElementEventArgs.cs
Add nullability and exception handling to WebElementEventArgs
dotnet/src/support/Events/WebElementEventArgs.cs
WebElementValueEventArgs.cs
Add nullability and exception handling to WebElementValueEventArgs
dotnet/src/support/Events/WebElementValueEventArgs.cs
WebDriverExtensions.cs
Enhance WebDriverExtensions with nullability and improved logic
dotnet/src/support/Extensions/WebDriverExtensions.cs
LoadableComponentException.cs
Add nullability annotations to LoadableComponentException
dotnet/src/support/UI/LoadableComponentException.cs
LoadableComponent{T}.cs
Add nullability and improve documentation in LoadableComponent
dotnet/src/support/UI/LoadableComponent{T}.cs
PopupWindowFinder.cs
Enhance PopupWindowFinder with nullability and simplified logic
dotnet/src/support/UI/PopupWindowFinder.cs
SlowLoadableComponent{T}.cs
Add nullability and improve exception handling in
SlowLoadableComponent
dotnet/src/support/UI/SlowLoadableComponent{T}.cs
UnexpectedTagNameException.cs
Add nullability annotations to UnexpectedTagNameException
dotnet/src/support/UI/UnexpectedTagNameException.cs
DefaultWait{T}.cs
Enhance DefaultWait with nullability and improved logic
dotnet/src/webdriver/Support/DefaultWait{T}.cs
IClock.cs
Enable nullable reference types in IClock
dotnet/src/webdriver/Support/IClock.cs
IWait{T}.cs
Add nullability annotations to IWait interface
dotnet/src/webdriver/Support/IWait{T}.cs
SystemClock.cs
Enable nullable reference types and simplify SystemClock
dotnet/src/webdriver/Support/SystemClock.cs
WebDriverWait.cs
Enable nullable reference types and simplify WebDriverWait
dotnet/src/webdriver/Support/WebDriverWait.cs
1 files
EventFiringWebDriverTest.cs
Set default values for mocks in EventFiringWebDriverTest
dotnet/test/support/Events/EventFiringWebDriverTest.cs
1 files
WebDriver.Support.csproj
Enable nullable annotations in project file
dotnet/src/support/WebDriver.Support.csproj