-
Notifications
You must be signed in to change notification settings - Fork 3.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
Add more advanced screenshot clipping options #4440
Comments
@mattbrailsford My colleague and I might try to implement this. We couldn't decide whether to have a |
An API like this might be good? puppeteer/puppeteer#1692 (comment) |
Co-authored-by: Minh Nguyen <[email protected]>
Co-authored-by: Minh Nguyen <[email protected]>
Co-authored-by: Minh Nguyen <[email protected]>
Co-authored-by: Minh Nguyen <[email protected]>
Closes cypress-io#4440 Co-authored-by: Minh Nguyen <[email protected]>
Closes cypress-io#4440 Co-authored-by: Minh Nguyen <[email protected]>
We've raised a preliminary PR #5078. |
Closes cypress-io#4440 Co-authored-by: Minh Nguyen <[email protected]>
Closes cypress-io#4440 Co-authored-by: Minh Nguyen <[email protected]>
@sebinsua sorry I never replied to your question, but this looks great. I think basing it on padding is a good solution. Inset could technically be achieved via a negative padding value so sounds like two birds with one stone 👍 |
Closes cypress-io#4440 Co-authored-by: Minh Nguyen <[email protected]>
Closes cypress-io#4440 Co-authored-by: Minh Nguyen <[email protected]>
Closes cypress-io#4440 Co-authored-by: Minh Nguyen <[email protected]>
Closes cypress-io#4440 Co-authored-by: Minh Nguyen <[email protected]>
Closes cypress-io#4440 Co-authored-by: Minh Nguyen <[email protected]>
Closes cypress-io#4440 Co-authored-by: Minh Nguyen <[email protected]> Co-authored-by: Jennifer Shehane <[email protected]>
Closes cypress-io#4440 Co-authored-by: Minh Nguyen <[email protected]>
Closes cypress-io#4440 Co-authored-by: Minh Nguyen <[email protected]> Co-authored-by: Jennifer Shehane <[email protected]>
Closes cypress-io#4440 Co-authored-by: Minh Nguyen <[email protected]> Co-authored-by: Jennifer Shehane <[email protected]>
Closes cypress-io#4440 Co-authored-by: Minh Nguyen <[email protected]> Co-authored-by: Jennifer Shehane <[email protected]>
Closes cypress-io#4440 Co-authored-by: Minh Nguyen <[email protected]> Co-authored-by: Jennifer Shehane <[email protected]>
Closes cypress-io#4440 Co-authored-by: Minh Nguyen <[email protected]> Co-authored-by: Jennifer Shehane <[email protected]>
Closes cypress-io#4440 Co-authored-by: Minh Nguyen <[email protected]> Co-authored-by: Jennifer Shehane <[email protected]>
Closes cypress-io#4440 Co-authored-by: Minh Nguyen <[email protected]> Co-authored-by: Jennifer Shehane <[email protected]>
Closes cypress-io#4440 Co-authored-by: Minh Nguyen <[email protected]> Co-authored-by: Jennifer Shehane <[email protected]>
Closes cypress-io#4440 Co-authored-by: Minh Nguyen <[email protected]> Co-authored-by: Jennifer Shehane <[email protected]>
Closes cypress-io#4440 Co-authored-by: Minh Nguyen <[email protected]> Co-authored-by: Jennifer Shehane <[email protected]>
Closes cypress-io#4440 Co-authored-by: Minh Nguyen <[email protected]> Co-authored-by: Jennifer Shehane <[email protected]>
Closes cypress-io#4440 Co-authored-by: Minh Nguyen <[email protected]> Co-authored-by: Jennifer Shehane <[email protected]>
Closes cypress-io#4440 Co-authored-by: Minh Nguyen <[email protected]> Co-authored-by: Jennifer Shehane <[email protected]>
* Handle 0px tall elements with a better error message Closes #5149 Co-authored-by: Minh Nguyen <[email protected]> Co-authored-by: Jennifer Shehane <[email protected]> * Add padding support to element#screenshot Closes #4440 Co-authored-by: Minh Nguyen <[email protected]> Co-authored-by: Jennifer Shehane <[email protected]> * add e2e tests
The code for this is done in cypress-io/cypress#5078, but has yet to be released. |
Released in |
Current behavior:
When creating a screenshot you can pass an options object with a clip option which accepts an x, y, width and height setting defining the absolute position that you want the screenshot to be clipped to.
Desired behavior:
I’d like to see the clipping options be extended to support relative or calculated coordinates. For example, the following could define a screenshot the viewport dimensions but inset by 50px.
Or when screenshotting an element, allow offsetting it’s coordinates to capture 20px of its surrounding area.
My use case for this is mostly to use cypress for automating documentation screenshots, but I’m sure it could have uses within the testing arena.
The text was updated successfully, but these errors were encountered: