Making screenshots in 'viewport' mode does not respect browser resolution #25246
Unanswered
wsbaser
asked this question in
Questions and Help
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hello,


I've created visual regression tests using cypress, but I'm having a problem with making screenshots for the areas of the page that have scrollbars. To solve the problem I've tried to increase browser resolution using the approach from this article https://www.cypress.io/blog/2021/03/01/generate-high-resolution-videos-and-screenshots/
It works. When I make screenshot in
'runner'
mode, then everything is fine. Window size is increased and I do not see the scrollbars.But when I use
cy.screenshot({capture:'viewport'})
then screenshot is taken using resolution 1920x885 and I still see the scrollbars.
Is there a possible workaround for this problem? Basically I need to make a screenshot the same as in 'runner' mode, but without a runner.
Here is the repository to reproduce the issue
https://github.com/wsbaser/cypress-wikipedia
Beta Was this translation helpful? Give feedback.
All reactions