Skip to content
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

Doesn't make a proper whole page screenshot of the page with a modal or a popup #95

Open
plagov opened this issue Jan 4, 2022 · 2 comments
Assignees

Comments

@plagov
Copy link

plagov commented Jan 4, 2022

I used to use version 0.9.3 of the selenium-shutterbug. I did the whole page screenshot as follows:

Shutterbug.shootPage(webDriver, ScrollStrategy.WHOLE_PAGE).withName(name).save(path)

Recently, I have updated the dependency to version 1.5. The above code didn't compile, so I changed it to this:

Shutterbug.shootPage(webDriver, Capture.FULL).withName(name).save(path)

I noticed that with the updated version, it doesn't make a proper whole page screenshot if there's a modal window or a popup on the page. This modal is shown multiple times and the page looks very weird.
Reverted back to 0.9.3.

@plagov plagov changed the title Doesn't make a proper whole page screenshot with a modal or a popup Doesn't make a proper whole page screenshot of the page with a modal or a popup Jan 4, 2022
@glibas glibas self-assigned this Feb 2, 2022
@glibas
Copy link
Member

glibas commented Apr 4, 2022

Hi @plagov ,

Have you got a reproducible example so we can debug?

Thanks
Glib

@plagov
Copy link
Author

plagov commented Apr 4, 2022

Hi @glibas,

It looks like this issue is partially solved.
So, here's what I did. I found a public website with a React modal (at my working project the web app I'm testing is also using React). I wrote a basic test that opens a modal window and makes two screenshots - with Capture.FULL and Capture.FULL_SCROLL strategies.

So, with v1.6 of the selenium-shutterbug, the Capture.FULL strategy works fine and as expected. The other one (Capture.FULL_SCROLL) doesn't make a proper screenshot.
Here's the code you can run and see how both look - https://github.com/plagov/shutterbug-screenshot-reproduce

I also checked my working project and Capture.FULL with v1.6 also does a proper screenshot with a modal. I will check throughout the week how it works with sticky headers, alert tooltips and similar floating elements.

So, it seems the Capture.FULL works fine with Chrome and Capture.FULL_SCROLL doesn't make a proper screenshot.

Let me know if you need an additional input from my side or any help!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants