-
-
Notifications
You must be signed in to change notification settings - Fork 8.5k
[py][bidi]: add BiDi script module commands #15880
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
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
PR Code Suggestions ✨Explore these optional code suggestions:
|
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.
LGTM, great work @navin772
@shbenzer thanks for the review! I have one doubt, currently the low level APIs implemented in this PR are available via the driver instance like - I am planning to add these high level APIs for the script module:
These will also be available via the same driver instance - |
methods prepended with _ are marked as private in python but are still accessible |
yes, they are accessible, but I am not sure if that's a nice way to access the low level API, since we are not doing the |
I used _ in the Network module, but I’m definitely open to other suggestions |
@shbenzer I will add the |
User description
🔗 Related Issues
💥 What does this PR do?
Adds the low level API commands for the Script module - https://w3c.github.io/webdriver-bidi/#module-script
🔧 Implementation Notes
I have only implemented the commonly used types like
EvaluateResult
,RealmInfo
,RealmType
,Source
andResultOwnership
. Other types are very nested and not required to be implemented explicitly, we can directly pass them asdict
.💡 Additional Considerations
This PR adds the low level APIs only, I will open another PR that adds the remaining High level BiDi script APIs:
pin()
unpin()
execute()
addDomMutationHandler()
removeDomMutationHandler()
🔄 Types of changes
PR Type
Enhancement, Tests
Description
Add BiDi script module commands to Python bindings
Add comprehensive tests for BiDi script module
Changes walkthrough 📝
script.py
Implement BiDi script module commands and types
py/selenium/webdriver/common/bidi/script.py
etc.)
Source, etc.)
options
bidi_script_tests.py
Add comprehensive tests for BiDi script module
py/test/selenium/webdriver/common/bidi_script_tests.py
serialization, user activation