-
Notifications
You must be signed in to change notification settings - Fork 46
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
getDocHeight()
incorrectly returning viewport height for some applications
#66
Comments
Hi @roboaks Hope that helps. Hard to tell not having access to the app, so just an assumption. |
I added code to scroll to the bottom of the page before taking the screenshot and it doesn't scroll the page. I tried the same code against Wikipedia and it works fine. I even put a breakpoint before the call to ShutterBug and manually scrolled the page but that made no difference. The size of the viewport and document are always calculated as the same. The fact that a basic call to Have you encountered other apps that behave this way? |
Another thing might be that the content you are trying to scroll is an iframe and js is executed on the parent page do it's not affecting iframe content |
I will investigate that. If that is indeed the case, is there a solution? |
Lol: #30 was requested by Richard Morris, who is a colleague. It looks like |
Implemented in v1.0 e.g
|
I am using Chrome 79.0.3945.88 (64-bit) and Selenium WebDriver 3.141.59. When I use a public website like Google or Wikipedia the
WHOLE_PAGE
strategy works fine. I can see the page scrolling and the screenshot reflects that,Using a proprietary application (Guidewire PolicyCenter, a major insurance system vendor), however, it doesn’t work. I’ve done some tracing and discovered the exact issue:
com.assertthat.selenium_shutterbug.utils.web.Browser.getDocHeight()
always returns the same value ascom.assertthat.selenium_shutterbug.utils.web.Browser.getViewportHeight()
. In short, the called JavaScript,Simply returns the viewport height.
I don’t have any knowledge of the web UI framework that PolicyCenter uses and, unfortunately, I can’t provide access to PolicyCenter, as we use it over a VPN.
Have you ever seen anything like this before? Do you have any suggestions?
The text was updated successfully, but these errors were encountered: