-
-
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] Align webdriver errors with spec #14936
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 error
andunsupported operation
.Introduced custom exception types for some now-handled error codes. Only change visible to users is a
WebDriverException
will 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:
UnhandledError
status and replaces it with W3C-compliantUnknownError
andUnsupportedOperation
statusesUnknownErrorException
andUnsupportedOperationException
WebDriverException
with more specific exception typesWebDriverException
Changes walkthrough 📝
HttpCommandExecutor.cs
Update error status in HTTP command executor
dotnet/src/webdriver/Remote/HttpCommandExecutor.cs
UnhandledError
withUnknownError
in error response handlingUnknownErrorException.cs
Add UnknownErrorException class implementation
dotnet/src/webdriver/UnknownErrorException.cs
exception support
UnsupportedOperationException.cs
Add UnsupportedOperationException class implementation
dotnet/src/webdriver/UnsupportedOperationException.cs
exception support
WebDriver.cs
Update WebDriver error handling implementation
dotnet/src/webdriver/WebDriver.cs
UnhandledError
withUnknownError
in error handlingUnknownError
andUnsupportedOperation
exceptionsUnhandledError
caseWebDriverError.cs
Update WebDriver error mappings
dotnet/src/webdriver/WebDriverError.cs
UnknownError
andUnsupportedOperation
instead of
UnhandledError
WebDriverResult.cs
Update WebDriverResult enum definitions
dotnet/src/webdriver/WebDriverResult.cs
UnhandledError
enum value withUnknownError
UnsupportedOperation
enum value