[bidi][js] Add high-level script command#14293
Conversation
PR Reviewer Guide 🔍
|
PR Code Suggestions ✨
|
66e3251 to
5794cd0
Compare
* [bidi][js] Add high-level script command * Fix formatting * Fix tests * Fix linting --------- Co-authored-by: Sri Harsha <12621691+harsha509@users.noreply.github.com>
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.
Related to #13992
Description
Motivation and Context
Types of changes
Checklist
PR Type
Enhancement, Tests
Description
LocalValueclass.executemethod inScriptclass to execute scripts with arguments.executemethod covering various argument types.Changes walkthrough 📝
protocolValue.js
Add support for special number types and argument handlingjavascript/node/selenium-webdriver/bidi/protocolValue.js
SpecialNumberTypeto imports.createReferenceValueandgetArgumentstatic methods inLocalValueclass.deserializeValuemethod inRemoteValueclass to handleNonPrimitiveType.OBJECT.script.js
Add execute method to Script classjavascript/node/selenium-webdriver/lib/script.js
executemethod toScriptclass for executing scripts witharguments.
local_value_test.js
Update tests for object argument handlingjavascript/node/selenium-webdriver/test/bidi/local_value_test.js
LocalValue.webdriver_script_execute_test.js
Add tests for Script execute method with various argumentsjavascript/node/selenium-webdriver/test/lib/webdriver_script_execute_test.js
executemethod inScriptclass.numbers, arrays, sets, maps, objects, and regex.