-
Notifications
You must be signed in to change notification settings - Fork 9.1k
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
feat: use captureBeyondViewport
in Page.captureScreenshot
#6805
Conversation
captureBeyondViewport
in Page.captureScreenshot
Compress the screenshot.
Are you saying this restores the pre-v6.0.0 behavior? |
@@ -50,26 +50,8 @@ describe('Screenshots', function () { | |||
}); | |||
expect(screenshot).toBeGolden('screenshot-clip-rect.png'); | |||
}); | |||
// TODO: enable after the screenshot is fixed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this test being removed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The bug https://crbug.com/1173457 was closed with the motivation: if you need a screenshot bigger than the ViewPort, you have to use the flag captureBeyondViewport
.
This change uses the flag, screenshot works in the new way, but in the way can easily be called "correctly", the same way Firefox does it. No further TODO
needed.
It used to be 2 similar tests with the different expectations:
- skipped
should clip elements to the viewport size without artefacts
should clip elements to the viewport size with artefacts
I removed one of them and adjusted the expectations. It covers the issue point and the breaking change, verifying the screenshot works correctly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ack, thanks!
From this point, using |
da920cc
to
d82f63d
Compare
All (the pull request submitter and all commit authors) CLAs are signed, but one or more commits were authored or co-authored by someone other than the pull request submitter. We need to confirm that all authors are ok with their commits being contributed to this project. Please have them confirm that by leaving a comment that contains only Note to project maintainer: There may be cases where the author cannot leave a comment, or the comment is not properly detected as consent. In those cases, you can manually confirm consent of the commit author(s), and set the ℹ️ Googlers: Go here for more info. |
d82f63d
to
f952433
Compare
Why |
@sadym-chromium could you please make |
PR #7063 should address the issue. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
BREAKING CHANGE:
page.screenshot
makes a screenshot with the clip dimensions, not cutting it by the ViewPort size.