-
-
Notifications
You must be signed in to change notification settings - Fork 8.2k
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 01f6aaf)Here are some key observations to aid the review process:
|
PR Code Suggestions ✨Latest suggestions up to 01f6aaf
Previous suggestions✅ 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 think I figured it out, could you run the merge workflow again @pujagani ? |
@p0deje hoping this fix does it - if you have a better idea let me know |
Able to initialize connections now. However connections are getting lost because of InvalidArgumentExceptions
|
Current status: Only 1 test is currently passing (test_network_initialized()), however the browser now recognizes commands as legitimate seemingly. I am not sure why callbacks are not being called, as the returned request_ids from add_request/response_handler() are Null Possible causes:
|
@shbenzer You might need to add some waits to give the time for the callback to be called. Start by adding |
@p0deje Tried some sleeps (e.g.
and failures persist |
@aguspe you have any suggestions? |
Oh sorry @shbenzer I think I got your notification lost and I marked everything as read :) I can give it a deeper look over the weekend, but maybe the issue is here:
The part that confused me the most was not how to add a callback, but also to have the listener listening for the event, it looks right but maybe you can print out to the console the responses and the requests I noticed a couple of errors while I was implementing it, and by debugging it that way I noticed that I was using the listener wrongly :) |
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
Network
class to handle network events and requests, supporting BiDi protocol operations.Network
class into the WebDriver, allowing network interception and authentication handling.Changes walkthrough 📝
network.py
Implement Network class for BiDi protocol support
py/selenium/webdriver/common/bidi/network.py
Network
class for handling network events andrequests.
command.py
Add network command constants for BiDi operations
py/selenium/webdriver/remote/command.py
remote_connection.py
Map network commands to HTTP endpoints
py/selenium/webdriver/remote/remote_connection.py
webdriver.py
Integrate Network class into WebDriver
py/selenium/webdriver/remote/webdriver.py
Network
class into WebDriver for BiDi support.bidi_network_tests.py
Add tests for BiDi network functionalities
py/test/selenium/webdriver/common/bidi_network_tests.py