[bidi][java] Update the capture screenshot APIs to include all parameters and remove scroll parameter#13743
Conversation
…ters and remove scroll parameter
|
PR Description updated to latest commit (be06c21)
|
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. |
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 is updated for captureScreenshot command. Additional parameters have been added and the "scrollIntoView" parameter is removed for element screenshots. The changes reflect this. This involves a breaking change of using "scrollIntoView" parameter. Avoiding deprecating it since the latest version of browser (including the one in Selenium Gtihub CI) will not support it.
Motivation and Context
Types of changes
Checklist
Type
Bug fix, Enhancement
Description
BoxClipRectangle,CaptureScreenshotParameters,ClipRectangle,ElementClipRectangle) to support flexible screenshot capture options according to the updated W3C BiDi spec.BrowsingContextto include an enhancedcaptureScreenshotmethod that supports new screenshot parameters, including clipping areas and image format/quality.scrollIntoViewparameter fromcaptureElementScreenshotto align with the latest BiDi spec, marking a breaking change.Changes walkthrough
BoxClipRectangle.java
Add BoxClipRectangle for box-shaped clipping in screenshotsjava/src/org/openqa/selenium/bidi/browsingcontext/BoxClipRectangle.java
BoxClipRectanglefor defining a box-shapedclipping area for screenshots.
toMapmethod to convert properties to a Map.BrowsingContext.java
Update captureScreenshot APIs to align with BiDi specjava/src/org/openqa/selenium/bidi/browsingcontext/BrowsingContext.java
captureScreenshotmethod that acceptsCaptureScreenshotParameters.captureElementScreenshotto remove thescrollIntoViewparameter and add
handle.CaptureScreenshotParameters.java
Add CaptureScreenshotParameters for flexible screenshot optionsjava/src/org/openqa/selenium/bidi/browsingcontext/CaptureScreenshotParameters.java
CaptureScreenshotParametersclass for specifying screenshotcapture options.
rectangle.
ClipRectangle.java
Introduce ClipRectangle base class for screenshot clippingjava/src/org/openqa/selenium/bidi/browsingcontext/ClipRectangle.java
ClipRectangleclass as a base for clipping areadefinitions.
ElementClipRectangle.java
Add ElementClipRectangle for element-based clipping in screenshotsjava/src/org/openqa/selenium/bidi/browsingcontext/ElementClipRectangle.java
ElementClipRectangleclass for element-based clipping inscreenshots.
BrowsingContextTest.java
Update tests for new screenshot capture methodsjava/test/org/openqa/selenium/bidi/browsingcontext/BrowsingContextTest.java
scrollIntoViewparameter.