-
Notifications
You must be signed in to change notification settings - Fork 61
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
how to deal with sticky CSS? #57
Comments
You might find this useful. https://docs.cypress.io/api/commands/screenshot#Full-page-captures-and-fixed-sticky-elements |
This should work:
otherwise a big resolution so it fits the entire page should do. |
Having to manually alter the page in order to get a screenshot of what the page is supposed to look like kind of defeats the purpose =) Chrome and FF both have "take a full page screenshot" functionality built in, is there a way to tap into that instead? e.g. in Chrome it's under dev tools -> [⋮] menu -> "run command" and then type screenshot; in FF there's a "take screenshot" icon on the main UI button bar that lets you pick "full page", both of which I would assume are actions that can be triggered by Cypress? (or... I hope? It would be weird if they didn't tap into those functions) |
Ah, according to https://docs.cypress.io/api/cypress-api/screenshot-api#Arguments this is just a standard option. |
hm, nope - after testing, that's still a very weird "scroll and tesselate", so I guess that won't get us actual real screenshots still =( |
this seems to be a none issue now, closing |
It looks like screenshots are based on "scrolling the page", which doesn't work for pages with
sticky
andfixed
CSS positioning, leading to hilariously wrong screenshots like this one:Is there any way to tell the screenshooter to not scroll, but use the browser's built in "take a full page screenshot" function?
The text was updated successfully, but these errors were encountered: