-
-
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
[🚀 Feature] [py]: Implement BiDi add/remove_request handler #14738
base: trunk
Are you sure you want to change the base?
Conversation
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
PR Code Suggestions ✨Explore these optional code suggestions:
|
@AutomatedTester What do you think? |
|
||
@pytest.mark.xfail_firefox | ||
@pytest.mark.xfail_safari | ||
@pytest.mark.xfail_edge |
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.
Is this not working against Firefox and Edge?
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.
It was working with edge. I've pushed a commit to remove xfail_edge
.
As for firefox, it fails with "unsupported operation" at network.continueRequest
. I see mentions of network.continueRequest
at https://wiki.mozilla.org/Firefox/Meeting/9-July-2024 , but I recall experiencing a similar problem with firefox when testing #14345.
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.
I really like this implementation and is showing a great direction.
Things that I think we need to think about (and I don't think it should block this) is how can we simplify the migration for folks using Classic to BiDi.
Generated from CDDL definitions in https://w3c.github.io/webdriver-bidi
Yup. I agree. |
I also wanted to point out a potential naming issue for BiDi objects. Our implementations of BiDi objects (including this PR) include However, some BiDi modules contain types that have the same name as the module which creates a naming conflict. In the particular case of |
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
Implementation of
add_request_handler
andremove_request_handler
as described in #13993. These methods directly require BiDi objectsnetwork.AddIntercept
network.BeforeRequestSent
network.ContinueRequest
network.RemoveRequest
browsingContext.Navigate
and other added objects are dependencies of objects listed above.
Motivation and Context
#13993
Types of changes
Checklist
PR Type
Enhancement, Tests
Description
network
property for accessing network features.Changes walkthrough 📝
bidi.py
Define base classes for BiDi objects
py/selenium/webdriver/common/bidi/bidi.py
BidiEvent
andBidiCommand
classes.browsing_context.py
Add browsing context navigation classes
py/selenium/webdriver/common/bidi/browsing_context.py
Navigate
andNavigateParameters
classes.BrowsingContext
andReadinessState
types.network.py
Implement network interception and request handling
py/selenium/webdriver/common/bidi/network.py
Network
class for managing network operations.script.py
Extend script module with stack trace classes
py/selenium/webdriver/common/bidi/script.py
StackFrame
andStackTrace
classes.network.py
Implement network management for remote WebDriver
py/selenium/webdriver/remote/network.py
webdriver.py
Integrate network management into WebDriver
py/selenium/webdriver/remote/webdriver.py
network
property for accessing network features.bidi_network_tests.py
Add tests for BiDi network request handlers
py/test/selenium/webdriver/common/bidi_network_tests.py