-
-
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] Update the capture screenshot APIs to include all parameters and remove scroll parameter #13743
[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.BrowsingContext
to include an enhancedcaptureScreenshot
method that supports new screenshot parameters, including clipping areas and image format/quality.scrollIntoView
parameter fromcaptureElementScreenshot
to align with the latest BiDi spec, marking a breaking change.Changes walkthrough
BoxClipRectangle.java
Add BoxClipRectangle for box-shaped clipping in screenshots
java/src/org/openqa/selenium/bidi/browsingcontext/BoxClipRectangle.java
BoxClipRectangle
for defining a box-shapedclipping area for screenshots.
toMap
method to convert properties to a Map.BrowsingContext.java
Update captureScreenshot APIs to align with BiDi spec
java/src/org/openqa/selenium/bidi/browsingcontext/BrowsingContext.java
captureScreenshot
method that acceptsCaptureScreenshotParameters
.captureElementScreenshot
to remove thescrollIntoView
parameter and add
handle
.CaptureScreenshotParameters.java
Add CaptureScreenshotParameters for flexible screenshot options
java/src/org/openqa/selenium/bidi/browsingcontext/CaptureScreenshotParameters.java
CaptureScreenshotParameters
class for specifying screenshotcapture options.
rectangle.
ClipRectangle.java
Introduce ClipRectangle base class for screenshot clipping
java/src/org/openqa/selenium/bidi/browsingcontext/ClipRectangle.java
ClipRectangle
class as a base for clipping areadefinitions.
ElementClipRectangle.java
Add ElementClipRectangle for element-based clipping in screenshots
java/src/org/openqa/selenium/bidi/browsingcontext/ElementClipRectangle.java
ElementClipRectangle
class for element-based clipping inscreenshots.
BrowsingContextTest.java
Update tests for new screenshot capture methods
java/test/org/openqa/selenium/bidi/browsingcontext/BrowsingContextTest.java
scrollIntoView
parameter.