Is it possible to take a screenshot of the whole page with Selenium/Capybara?

In case anyone washed up this shore looking for how to do this with Poltergeist you just need to pass the full argument:

page.save_screenshot('screen.png', full: true) # If providing a custom file name.
page.save_screenshot(full: true)               # Capybara sets a name based on timestamp.
page.save_and_open_screenshot('screen.png', full: true) # Same as save_screenshot.
page.save_and_open_screenshot(full: true)               # Same as save_screenshot.

Docs.

Hope it helps!

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)