-
-
Notifications
You must be signed in to change notification settings - Fork 8.5k
[py][bidi]: Implement BiDi browser module #15616
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:
|
@shbenzer thank you for implementing the Network module in python, I have implemented the Browser module taking inspiration from it! Feel free to review this. |
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.
This looks great!
Could we add the browser.SetClientWindowState browser command too?
Great work @navin772! |
User description
🔗 Related Issues
💥 What does this PR do?
Implements the BiDi browser module for the python bindings - https://w3c.github.io/webdriver-bidi/#module-browser.
These are the commands that have been added:
create_user_context
get_user_contexts
remove_user_context
get_client_windows
The PR also adds a new
common.py
file in thebidi/
directory that will contain the commonly used functions likecommand_builder
to avoid repetition.🔧 Implementation Notes
💡 Additional Considerations
🔄 Types of changes
PR Type
Enhancement, Tests
Description
Implemented BiDi browser module for Python bindings.
Added commands for user context and client window management.
Refactored common BiDi command builder to avoid duplication.
Introduced comprehensive tests for BiDi browser functionality.
Changes walkthrough 📝
browser.py
Added BiDi browser module implementation
py/selenium/webdriver/common/bidi/browser.py
ClientWindowInfo
andClientWindowState
classes.common.py
Added reusable BiDi command builder
py/selenium/webdriver/common/bidi/common.py
command_builder
function for BiDi commands.network.py
Refactored BiDi network commands to use common builder
py/selenium/webdriver/common/bidi/network.py
command_builder
.webdriver.py
Integrated BiDi browser module into WebDriver
py/selenium/webdriver/remote/webdriver.py
browser
property for accessing BiDi browser commands.__init__.py
Added init file for BiDi tests
py/test/selenium/webdriver/common/bidi/init.py
bidi_browser_tests.py
Added tests for BiDi browser module
py/test/selenium/webdriver/common/bidi_browser_tests.py
ClientWindowState
constants.