-
-
Notifications
You must be signed in to change notification settings - Fork 8.6k
[rb] Add Bidi Network Response Handler #14900
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:
|
User description
Description
This PR adds support to handle network responses and intercept them
It also refactors the previous implementations for network auth in ruby and allows to pass any method the user wants to the network methods
Now it's possible to call network.add_response_handler
It's also possible to call add_request_handler as follows:
And add auth handler should be called as:
It's also possible to use URL based filters to only allow selected URLs to be intercepted:
Here is a video of all the test passing, 25 integration tests passing on common/network, and 10 integration tests passing on bidi/network:
tests.passing.mov
Formatting results locally on the latest PR:
Motivation and Context
To complete the specification stated on #13993 and to get closer to having a full BiDi implementation for the Ruby bindings that the user can use for all their Network related needs
Types of changes
Checklist
PR Type
Enhancement
Description
continue_with_responsemethodcontinue_without_authandcancel_authChanges walkthrough 📝
network.rb
Enhanced network response handling and auth methodsrb/lib/selenium/webdriver/bidi/network.rb
continue_without_authandcancel_authcontinue_with_responsemethod for handling network responsescontinue_with_requestcommand nameonmethodnetwork.rb
Network handler implementation and management improvementsrb/lib/selenium/webdriver/common/network.rb
fetch_idfor request handlingnetwork_spec.rb
Network response and auth handling test coveragerb/spec/integration/selenium/webdriver/bidi/network_spec.rb
network_spec.rb
Network response handler integration testsrb/spec/integration/selenium/webdriver/network_spec.rb
network.rbs
Updated type signatures for network methodsrb/sig/lib/selenium/webdriver/bidi/network.rbs
bidi.rbs
Enhanced callback method type signaturerb/sig/lib/selenium/webdriver/bidi.rbs