-
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
Screenshot replicates top of image if element extends past top of viewport #7966
Comments
I have the same issue using the following config: support/index.js
.spec.js
That's the screenshot taken: |
I have the duplication issue in chrome but not firefox |
This issue has not had any activity in 180 days. Cypress evolves quickly and the reported behavior should be tested on the latest version of Cypress to verify the behavior is still occurring. It will be closed in 14 days if no updates are provided. |
I can confirm this issue is still occurring with Cypress |
ok so I think I figured this out, the
By default 'screenshot' takes an image of the full page, not viewport: |
@brett-sprad are your tests all working when you provide that argument to the cy.screenshot call? |
Unfortunately we have to close this issue due to inactivity. Please comment if there is new information to provide concerning the original issue and we can reopen. |
Current behavior:
Calling screenshot on an element that is scaled to be larger than the viewport produces a screenshot that is not reflective of what the user actually sees. It properly cuts off at the bottom of the screen, but duplicates parts of the screen at the top.
Here's an example:
The resulting screenshot looks like this:
Desired behavior:
Calling
screenshot()
should produce the correct screenshot. Currently, with this test case callingcy.screenshot()
(the full page screenshot) will produce the correct screenshot that appears as follows. Calling screenshot onmain
should produce a similar result (without padding):The text was updated successfully, but these errors were encountered: