-
-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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] Add not-null Response.Value
helper
#15243
[dotnet] Add not-null Response.Value
helper
#15243
Conversation
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
PR Code Suggestions ✨Explore these optional code suggestions:
|
…selenium into not-null-response
Test failures are unrelated to this PR //java/test/org/openqa/selenium/mobile:NetworkConnectionTest
//java/test/org/openqa/selenium/remote:RemoteWebDriverScreenshotTest
//java/test/org/openqa/selenium/remote:RemoteWebDriverScreenshotTest-firefox-beta
//rb/spec/integration/selenium/webdriver:network-firefox-beta-bidi
//rb/spec/integration/selenium/webdriver:network-firefox-bidi |
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.
Add not-null
Response.Value
helperMotivation and Context
DRY-ing up future null checks on
Response.Value
Types of changes
Checklist
PR Type
Enhancement
Description
Added a helper method
GetNotNullValue
inResponse
class.Ensures
Response.Value
is not null, throws exception otherwise.Improves code reliability by centralizing null checks.
Changes walkthrough 📝
Response.cs
Add `GetNotNullValue` method to `Response` class
dotnet/src/webdriver/Response.cs
GetNotNullValue
method to handle null checks forResponse.Value
.WebDriverException
ifValue
is null.