-
-
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] Modernize exception handling in tests #14776
Conversation
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
PR Code Suggestions ✨Explore these optional code suggestions:
|
@nvborisenko Feedback has been addressed, this PR is ready for another look The feedback so far could be used to improve already-existing tests, but I wanted to keep this PR within reason. Maybe that can be a follow-up |
Thank you, @RenderMichael ! CI is failing due to unrelated changes (ShadowRoot). |
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 uses modern methods when making assertions or suppressions of exceptions.
Motivation and Context
Modernization and avoiding first-chance exceptions.
Types of changes
Checklist
PR Type
Enhancement, Tests
Description
Assert.That
.Changes walkthrough 📝
10 files
AlertsTest.cs
Modernize exception handling in AlertsTest
dotnet/test/common/AlertsTest.cs
Assert.That
with exception expectations.NetworkEventsTest.cs
Update exception handling in NetworkEventsTest
dotnet/test/common/BiDi/Network/NetworkEventsTest.cs
ConfigureAwaitOptions.SuppressThrowing
.CorrectEventFiringTest.cs
Simplify exception handling in CorrectEventFiringTest
dotnet/test/common/CorrectEventFiringTest.cs
ElementAttributeTest.cs
Refactor exception handling in ElementAttributeTest
dotnet/test/common/ElementAttributeTest.cs
Assert.That
for exceptions.RemoteSeleniumServer.cs
Enhance HTTP request handling in RemoteSeleniumServer
dotnet/test/common/Environment/RemoteSeleniumServer.cs
TestWebServer.cs
Simplify HTTP request handling in TestWebServer
dotnet/test/common/Environment/TestWebServer.cs
ExecutingJavascriptTest.cs
Modernize exception handling in ExecutingJavascriptTest
dotnet/test/common/ExecutingJavascriptTest.cs
Assert.That
for exception expectations.FrameSwitchingTest.cs
Update frame switching exception handling
dotnet/test/common/FrameSwitchingTest.cs
TargetLocatorTest.cs
Refactor exception handling in TargetLocatorTest
dotnet/test/common/TargetLocatorTest.cs
Assert.That
.WindowSwitchingTest.cs
Modernize exception handling in WindowSwitchingTest
dotnet/test/common/WindowSwitchingTest.cs
Assert.That
for exception handling.