Update script commands to fix the failing BiDi tests - #13737
Conversation
|
PR Description updated to latest commit (e6d52db)
|
PR Review
✨ Review tool usage guide:Overview: The tool can be triggered automatically every time a new PR is opened, or can be invoked manually by commenting on any PR.
See the review usage page for a comprehensive guide on using this tool. |
PR Code Suggestions
✨ Improve tool usage guide:Overview:
See the improve usage page for a comprehensive guide on using this tool. |
e6d52db to
64a3472
Compare
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
W3C BiDi spec was updated to ensure the if browsing context is passed for adding the preload script command, it cannot be empty. This was implemented from Firefox 124 onwards. Updated the command accordingly.
Motivation and Context
Types of changes
Checklist
Type
enhancement, bug_fix
Description
Script.javato dynamically includecontextsinaddPreloadScriptcommands based on non-emptybrowsingContextIds, enhancing flexibility and adherence to updated W3C BiDi spec.ScriptCommandsTest.javaby removing@NotYetImplemented(FIREFOX)annotations, indicating these features are now supported.scriptManager.jsin the JavaScript bindings to accept and handle multiple browsing context IDs, allowing for more versatile script management.script_test.jsto reflect these changes, ensuring consistency and correctness in testing.Changes walkthrough
Script.java
Refactor and Update Script Command for Browsing Contextsjava/src/org/openqa/selenium/bidi/module/Script.java
addPreloadScriptmethods to conditionally includecontextsparameter based on
browsingContextIdsbeing non-empty.Mapfor dynamic construction ofcommand parameters.
scriptManager.js
Support Multiple Browsing Contexts in ScriptManagerjavascript/node/selenium-webdriver/bidi/scriptManager.js
initto accept multiple browsing context IDs.ScriptCommandsTest.java
Enable Preload Script Tests for Firefoxjava/test/org/openqa/selenium/bidi/script/ScriptCommandsTest.java
@NotYetImplemented(FIREFOX)annotations, indicating supportfor Firefox in preload script tests.
script_test.js
Update ScriptManager Tests for Browsing Context Changesjavascript/node/selenium-webdriver/test/bidi/script_test.js
ScriptManager.