-
-
Notifications
You must be signed in to change notification settings - Fork 8.6k
[dotnet] [bidi] Do not throw when CallFunction or Evaluate return exceptional result (breaking change) #15521
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:
|
|||||||||||||||
dotnet/src/webdriver/BiDi/Modules/Script/ScriptEvaluateException.cs
Outdated
Show resolved
Hide resolved
|
Not related to this PR, I added a prefix |
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.
Thanks Mike.
Description
In an effort for Selenium's raw BiDi to return the exact response from the endpoint, we should not throw exceptions unless the opt-in
ThrowOnError()method is called.Motivation and Context
Fixes #15414
Types of changes
Checklist
PR Type
Enhancement, Tests
Description
Updated
EvaluateAsyncandCallFunctionAsyncmethods to handle exceptional results without throwing exceptions directly.ThrowOnErrormethod inEvaluateResultto centralize error handling.EvaluateAsyncandCallFunctionAsynctoEvaluateResultfor consistency.Enhanced error handling by refining
ScriptEvaluateExceptionto include detailed stack trace information.Adjusted test cases to validate the new
ThrowOnErrorbehavior and ensure proper handling of exceptional results.EvaluateResultSuccessand useThrowOnErrorfor result validation.Improved serialization logic in
ChannelLocalValueto ensure proper JSON property naming.Changes walkthrough 📝
5 files
RefactoredEvaluateAsyncandCallFunctionAsyncmethods for errorhandling
AddedThrowOnErrormethod toEvaluateResultfor centralized errorhandling
Improved JSON serialization for `ChannelLocalValue`Enhanced exception message with detailed stack traceRemoved direct exception throwing in
EvaluateAsyncandCallFunctionAsync5 files
Updated tests to validateThrowOnErrorbehavior forCallFunctionAsyncAdjusted parameter tests to handleThrowOnErrorinCallFunctionAsyncRefined remote value tests to useThrowOnErrorfor result validationEnhanced evaluation parameter tests with `ThrowOnError` validationUpdated script command tests to validate `ThrowOnError` behavior