Need fully rendered WebDriver screenshots? Use Firefox

If you’re using Chrome to run your WebDriver tests and are wondering why the screenshots don’t show the fully rendered page (including below the fold), here’s your answer.

ChromeDriver 2 broke fully rendered screenshot capture (over 2 years ago), and if you want these without doing some crazy workarounds like scrolling through the page using JavaScript and stitching images, a simple option is to run your tests in Firefox as it still supports fully rendered screenshots.

You’ll start seeing fully rendered screenshots like this one from WordPress.com on mobile below.

Update 18 January 2017: a WatirMelon reader Ian has pointed out that full screen screenshots no longer work with the latest Firefox and Selenium versions. By downgrading Firefox to 41.0 and downgrading Selenium to 2.48.1 he was able to restore full screen screenshots.

SIGNUP_en_mobile_0_HOME_screenshot1446595531514

Author: Alister Scott

Alister is an Excellence Wrangler for Automattic.