-
-
Notifications
You must be signed in to change notification settings - Fork 8.6k
[dotnet] Align webdriver errors with spec #14936
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
Conversation
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
PR Code Suggestions ✨Explore these optional code suggestions:
|
|
I guess we can move further reviewing it: at least 2 members think of it came from obsolete https://www.selenium.dev/documentation/legacy/json_wire_protocol, and python doesn't have this error code. |
|
@RenderMichael I propose to expand this PR to align all actual error codes, not only |
UnhandledError error statusUnhandledError error status
UnhandledError error status…lenium into unhandled-error
|
Seems are deprecating "aggressively", I mean it will become to hard to manage when exactly we should remove deprecated code. I propose to just to append a hint when exactly it will be deprecated. Usually, as I understand deprecation policy, it is +2 minor releases. So instead of |
|
Thanks @RenderMichael for the contribution! |
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
Obsoletes out-of-spec result status
UnhandledError. Replace usage withunknown errorandunsupported operation.Introduced custom exception types for some now-handled error codes. Only change visible to users is a
WebDriverExceptionwill be replaced with a more specific exception type (that derives fromWebDriverException).Motivation and Context
Broken off from #14892. This removes a webdriver result option for something which does not exist in the spec.
Types of changes
Checklist
PR Type
Enhancement
Description
This PR implements W3C WebDriver specification compliance changes for error handling:
UnhandledErrorstatus and replaces it with W3C-compliantUnknownErrorandUnsupportedOperationstatusesUnknownErrorExceptionandUnsupportedOperationExceptionWebDriverExceptionwith more specific exception typesWebDriverExceptionChanges walkthrough 📝
HttpCommandExecutor.cs
Update error status in HTTP command executordotnet/src/webdriver/Remote/HttpCommandExecutor.cs
UnhandledErrorwithUnknownErrorin error response handlingUnknownErrorException.cs
Add UnknownErrorException class implementationdotnet/src/webdriver/UnknownErrorException.cs
exception support
UnsupportedOperationException.cs
Add UnsupportedOperationException class implementationdotnet/src/webdriver/UnsupportedOperationException.cs
exception support
WebDriver.cs
Update WebDriver error handling implementationdotnet/src/webdriver/WebDriver.cs
UnhandledErrorwithUnknownErrorin error handlingUnknownErrorandUnsupportedOperationexceptionsUnhandledErrorcaseWebDriverError.cs
Update WebDriver error mappingsdotnet/src/webdriver/WebDriverError.cs
UnknownErrorandUnsupportedOperationinstead of
UnhandledErrorWebDriverResult.cs
Update WebDriverResult enum definitionsdotnet/src/webdriver/WebDriverResult.cs
UnhandledErrorenum value withUnknownErrorUnsupportedOperationenum value