-
-
Notifications
You must be signed in to change notification settings - Fork 8.5k
[py][bidi]: Implement low-level API for Input BiDi module #16049
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
base: trunk
Are you sure you want to change the base?
Conversation
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.
Pull Request Overview
This PR implements the BiDi INPUT module for Python WebDriver bindings, providing low-level API access to the W3C WebDriver BiDi input specification. The implementation adds comprehensive input action support including keyboard, pointer, and wheel interactions, plus file dialog event handling.
Key changes include:
- Implementation of all BiDi input commands (perform_actions, release_actions, set_files)
- Support for keyboard, pointer, and wheel input sources with proper action sequences
- File dialog event handling with add/remove handler functionality
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 5 comments.
File | Description |
---|---|
py/selenium/webdriver/common/bidi/input.py |
Core implementation of BiDi input module with action classes, source actions, and Input class |
py/selenium/webdriver/remote/webdriver.py |
Integration of input module as a property in WebDriver class |
py/test/selenium/webdriver/common/bidi_input_tests.py |
Comprehensive test suite covering all input functionality |
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
PR Code Suggestions ✨Explore these optional code suggestions:
|
User description
🔗 Related Issues
💥 What does this PR do?
Adds the BiDi INPUT module for the python bindings - https://w3c.github.io/webdriver-bidi/#module-input
🔧 Implementation Notes
The PR adds 3 commands and 1 event (
input.fileDialogOpened
).Commands:
perform_actions
release_actions
set_files
Event handlers:
add_file_dialog_handler
remove_file_dialog_handler
💡 Additional Considerations
This is a low-level API and thus I have added support for all the types mentioned in the BiDi spec.
🔄 Types of changes
PR Type
Enhancement
Description
Implement BiDi INPUT module with 3 commands and 1 event
Add comprehensive action classes for keyboard, pointer, and wheel inputs
Include file dialog event handling with subscription management
Provide extensive test coverage for all input functionality
Diagram Walkthrough
File Walkthrough
input.py
New BiDi INPUT module implementation
py/selenium/webdriver/common/bidi/input.py
webdriver.py
WebDriver integration for INPUT module
py/selenium/webdriver/remote/webdriver.py
script.py
Script execute method null handling fix
py/selenium/webdriver/common/bidi/script.py
bidi_input_tests.py
Complete INPUT module test suite
py/test/selenium/webdriver/common/bidi_input_tests.py