-
-
Notifications
You must be signed in to change notification settings - Fork 8.2k
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
[bidi][java] Add high-level logging APIs #14225
Conversation
PR Reviewer Guide 🔍
|
PR Code Suggestions ✨
|
@diemol Does this look alright? |
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.
Thank you, @pujagani!
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
Related to #14135.
Motivation and Context
Implement high-level BiDi logging API.
The core logic did not take time, but trying to avoid the RemoteWebDriver casting took a lot of time to figure out but after spending sufficient time could not find a way to avoid circular dependency issues. Hence this PR took time. We could restructure it in a later release like Selenium 6, when everything uses BiDi. The current goal is to focus on getting the high-level APIs implemented.
Types of changes
Checklist
PR Type
Enhancement, Tests
Description
RemoteScript
class to implement high-level BiDi logging API.RemoteScript
withRemoteWebDriver
to handle console messages and JavaScript errors.Script
interface defining methods for logging handlers.RemoteScript
functionality, including handler addition, removal, and multiple handler scenarios.Changes walkthrough 📝
RemoteScript.java
Add `RemoteScript` class for BiDi logging API integration
java/src/org/openqa/selenium/remote/RemoteScript.java
RemoteScript
class implementingScript
interface.errors.
handlers.
RemoteWebDriver.java
Integrate `RemoteScript` with `RemoteWebDriver`
java/src/org/openqa/selenium/remote/RemoteWebDriver.java
remoteScript
field toRemoteWebDriver
.script()
method to initialize and returnRemoteScript
.Script.java
Define `Script` interface for logging handlers
java/src/org/openqa/selenium/remote/Script.java
Script
interface with methods for handling console messagesand JavaScript errors.
WebScriptTest.java
Add tests for `RemoteScript` logging functionality
java/test/org/openqa/selenium/WebScriptTest.java
RemoteScript
functionality.handlers.
BUILD.bazel
Update Bazel build file for BiDi logging dependencies
java/src/org/openqa/selenium/remote/BUILD.bazel