-
-
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
[py] BiDi Network implementation of Intercepts and Auth in Python #14592
base: trunk
Are you sure you want to change the base?
[py] BiDi Network implementation of Intercepts and Auth in Python #14592
Conversation
PR Reviewer Guide 🔍(Review updated until commit 2b3bb2a)Here are some key observations to aid the review process:
|
PR Code Suggestions ✨Latest suggestions up to 2b3bb2a Explore these optional code suggestions:
Previous suggestions✅ Suggestions up to commit 01f6aaf
✅ Suggestions up to commit 14bf971
|
Thought I might need it, but didn't
was adding this to BUILD.bazel for easy testing:
so i could run |
Think it's ready now... @AutomatedTester could you give it a look? |
Persistent review updated to latest commit 01f6aaf |
I wrote those two 😄 |
Switched to using add_callback() in __on(). Getting dropped websocket connections which I'm not sure the cause of, and that might be the cause of the failures. Not sure otherwise - I think we're close though.
|
hmm... @p0deje I unified request/response_id with the callback_id returned by add_callback (by updating __on() to return it) - however the issue persists. It was a good catch, but seem there is a deeper flaw. |
I updated the callback_on_url() construction in add_request/response_handler() to create a unique request_id if not provided with one in data, but it might be better to throw an exception instead (or simply set it as None):
|
@shbenzer Do you not want to continue working on the PR? |
I accidentally deleted the branch when I was cleaning up my fork (didn't think it'd close the pr but it's been reopened now) - I'm still working on it. However I'd love if someone could pull and give it a look to see if they can figure out the current blockage. |
Persistent review updated to latest commit 2b3bb2a |
Adding this to Build.Bazel for easy testing:
|
User description
Add implementations for BiDi Network's Auth and Interception to Python
Description
Added network.py: Network, Request, and Response classes w/ related methods
Added bidi_network_tests.py
Motivation and Context
Issue #13993
Types of changes
Checklist
PR Type
Enhancement, Tests
Description
Added BiDi Network support for request/response interception and authentication.
Implemented
Network
,Request
, andResponse
classes with related methods.Integrated new network commands into WebDriver's remote command structure.
Added comprehensive tests for BiDi Network features, including request/response handling and authentication.
Changes walkthrough 📝
network.py
Implement BiDi Network operations and data encapsulation
py/selenium/webdriver/common/bidi/network.py
Network
class for BiDi Network operations.handling.
Request
andResponse
classes for encapsulating networkdata.
command.py
Add network-related commands for BiDi support
py/selenium/webdriver/remote/command.py
remote_connection.py
Map BiDi network commands to HTTP endpoints
py/selenium/webdriver/remote/remote_connection.py
connection.
webdriver.py
Integrate BiDi Network into WebDriver
py/selenium/webdriver/remote/webdriver.py
Network
class into WebDriver.websocket_connection.py
Enhance callback handling for BiDi network events
py/selenium/webdriver/remote/websocket_connection.py
bidi_network_tests.py
Add tests for BiDi Network features
py/test/selenium/webdriver/common/bidi_network_tests.py