Take screenshot of whole page, including part below browser fold

912 views
Skip to first unread message

Björn

unread,
Jul 23, 2015, 2:40:10 PM7/23/15
to NightwatchJs
Is it possible to take a screenshot of the whole page, not just the currently visible viewport?

I tried to resize the browser window to a very high height, but it wont expand further than the OS resolution. The screenshots only contain the upper part of hight pages.

If I use phantomjs it will give me the whole page, which makes sense, because its headless and there is no scrolling. Is it also possible with other browsers using nightwatch?

browser
.resizeWindow(1200, 10000)
.url("yahoo.com")
.saveScreenshot("/folder")

Corrinna Rainwater

unread,
Jul 23, 2015, 5:05:01 PM7/23/15
to NightwatchJs, bjn.m...@googlemail.com
Another approach could be zoom. Not ideal, especially if you dont know which zoom level will fit to show the whole page.

Björn

unread,
Jul 25, 2015, 5:57:09 AM7/25/15
to NightwatchJs, frau...@gmail.com
Thats an idea... but I cant find any command (http://nightwatchjs.org/api) to set the page zoom and I am worried that this could lessen the quality of the screenshots.

I found, that firefox does also make full page screenshots, so its only chrome. Haven´t testet IE yet.
Reply all
Reply to author
Forward
0 new messages