docs: Document screenshot padding viewport clamping behavior#150
Draft
promptless[bot] wants to merge 1 commit intomainfrom
Draft
docs: Document screenshot padding viewport clamping behavior#150promptless[bot] wants to merge 1 commit intomainfrom
promptless[bot] wants to merge 1 commit intomainfrom
Conversation
| - `elementAttribute`: (Optional) Object of attribute key-value pairs that the element must have. | ||
| - `elementAria`: (Optional) The computed accessible name of the element. Supports regex patterns. | ||
| - `padding`: (Optional) Add padding around the element before cropping. Can be a single number (all sides) or an object `{ top, right, bottom, left }`. | ||
| - `padding`: (Optional) Add padding around the element before cropping. Can be a single number (all sides) or an object `{ top, right, bottom, left }`. Padding that extends beyond the viewport is automatically clamped. |
Contributor
Author
There was a problem hiding this comment.
Citation: Based on changes in src/tests/saveScreenshot.js that add viewport bounds clamping for screenshot coordinates. The code clamps negative x/y values to 0, limits width/height to viewport dimensions, and ensures minimum 1px dimensions.
View source
Contributor
|
Important Review skippedBot user detected. To trigger a single review, invoke the You can disable this status message by setting the Comment |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Open this suggestion in Promptless to view citations and reasoning process
Updates the
screenshotaction documentation to clarify that padding is automatically clamped to viewport bounds. This ensures users understand that screenshots with padding extending beyond the viewport will still capture correctly, rather than failing.Trigger Events
doc-detective/core PR #424: Enhance Appium integration and screenshot handling
Promptless Research (1 GitHub PR)
Agent Response
Help us improve Promptless — If this suggestion missed the mark, please share quick feedback.
If you want Promptless to make further changes on this PR, feel free to leave a comment tagging Promptless (It won't show up in the user drop down but Promptless will get it!)