[py][bidi]: add BiDi script module commands#15880
Conversation
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
PR Code Suggestions ✨Explore these optional code suggestions:
|
|||||||||
|
@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 |
|
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,SourceandResultOwnership. 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 (which are private), 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 typespy/selenium/webdriver/common/bidi/script.py
etc.)
Source, etc.)
options
bidi_script_tests.py
Add comprehensive tests for BiDi script modulepy/test/selenium/webdriver/common/bidi_script_tests.py
serialization, user activation