[bidi][js] Add high-level logging API#14135
Conversation
PR Reviewer Guide 🔍
|
PR Code Suggestions ✨
|
Related to SeleniumHQ#13992 Co-authored-by: Titus Fortner <titusfortner@users.noreply.github.com>
PR Reviewer Guide 🔍
|
PR Code Suggestions ✨
|
Related to SeleniumHQ#13992 Co-authored-by: Titus Fortner <titusfortner@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.
Description
Partial implementation of #13992
Motivation and Context
Provide high-level API that is easy for users to use.
Types of changes
Checklist
PR Type
Enhancement, Tests
Description
Scriptclass to handle JavaScript error and console message logging.Scriptclass into theWebDriverclass with a newscriptmethod.LogInspectorfor removing non-existent callbacks.Scriptclass methods, including error handling.Changes walkthrough 📝
logInspector.js
Add error handling for callback removaljavascript/node/selenium-webdriver/bidi/logInspector.js
deletion.
script.js
Introduce Script class for logging handlersjavascript/node/selenium-webdriver/lib/script.js
Scriptclass to handle JavaScript error and consolemessage logging.
handlers.
webdriver.js
Integrate Script class into WebDriverjavascript/node/selenium-webdriver/lib/webdriver.js
Scriptclass into theWebDriverclass.scriptmethod to initialize and return aScriptinstance.webdriver_script_test.js
Add tests for Script class logging handlersjavascript/node/selenium-webdriver/test/lib/webdriver_script_test.js
Scriptclass methods.message handlers.