[bidi] Add source type to log entry #14244
Merged
+93
−53
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Add source to log entry events in compliance with the spec so the user can use that browsing context information to chain more commands.
Motivation and Context
Types of changes
Checklist
PR Type
Enhancement, Tests
Description
Source
field to various log entry classes (BaseLogEntry
,ConsoleLogEntry
,GenericLogEntry
,JavascriptLogEntry
) in both Java and JavaScript implementations.fromJson
methods to handle the newSource
field.realm
field and related methods from log entry classes.Source
field and removed assertions forrealm
.Changes walkthrough 📝
BaseLogEntry.java
Add `Source` field to `BaseLogEntry` class.
java/src/org/openqa/selenium/bidi/log/BaseLogEntry.java
Source
field toBaseLogEntry
.Source
.Source
.ConsoleLogEntry.java
Add `Source` field and remove `realm` in `ConsoleLogEntry`.
java/src/org/openqa/selenium/bidi/log/ConsoleLogEntry.java
Source
field toConsoleLogEntry
.Source
.fromJson
method to readSource
.realm
field and related methods.GenericLogEntry.java
Add `Source` field to `GenericLogEntry` class.
java/src/org/openqa/selenium/bidi/log/GenericLogEntry.java
Source
field toGenericLogEntry
.Source
.fromJson
method to readSource
.JavascriptLogEntry.java
Add `Source` field to `JavascriptLogEntry` class.
java/src/org/openqa/selenium/bidi/log/JavascriptLogEntry.java
Source
field toJavascriptLogEntry
.Source
.fromJson
method to readSource
.logEntries.js
Add `Source` field and remove `realm` in log entries.
javascript/node/selenium-webdriver/bidi/logEntries.js
Source
field toBaseLogEntry
.Source
.realm
field and related methods inConsoleLogEntry
.logInspector.js
Include `Source` field in log entry creation.
javascript/node/selenium-webdriver/bidi/logInspector.js
Source
field.realm
field handling.LogInspectorTest.java
Update tests to include `Source` field assertions.
java/test/org/openqa/selenium/bidi/log/LogInspectorTest.java
Source
field in log entry tests.realm
.log_inspector_test.js
Update tests to include `Source` field assertions.
javascript/node/selenium-webdriver/test/bidi/log_inspector_test.js
Source
field in log entry tests.realm
.