# Is there any automated cross-browser screenshot capturing tool

I'm looking for an automated screenshot tool which can take screenshot of multiple pages where we can define the url, viewport size and it will navigate to those pages, capture screenshot of the entire page and save it locally.

It should be cross browser compatible (Chrome, Firefox, Internet explorer). I've looked at PhantomJS however, since it's headless rendering, it doesn't exactly match with the real browser. Nimbus, Snagit, Awesome screenshot requires manual effort.

Since I have 1000's of page to capture, manual mode would be too time consuming. I've also looked at nightwatch JS which is based on webdriverIO and selenium however, it lacked option to capture full-page screenshot.

You can use the Selenium Webdriver itself to do it.

See this answer. Just do this procedure for each page you want to check.

• I've tried Selenium-Webdriver however, it doesn't seems to be capturing the entire page screenshot at once. – Rahul Dagli Dec 20 '16 at 12:38
• Could you share that code that fails? – João Farias Dec 23 '16 at 18:07

It should be cross browser compatible (Chrome, Firefox, Internet explorer).

You can use the iMacros for Chrome, Firefox and IE addons. They all have a command called "Screenshot":

http://wiki.imacros.net/SCREENSHOT

You can use a 2-line macro for taking screenshots:

URL GOTO http://your-url.com
SCREENSHOT TYPE=PAGE FOLDER=* FILE=*


It's possible to take a screenshot using Selenium WebDriver. Try this java sample..

WebDriver driver = new FirefoxDriver();
driver.get("http://www.example.com/");
File srcFile = (File) (((TakesScreenshot) driver).getScreenshotAs(OutputType.FILE));)
FileUtils.copyFile(scrFile, new File("c:\\tmp\\picture.png"));


I've run my browser tests in VirtualBox which allows for recording the session. It might be overkill for what you need for screenshots but I found it very useful for for visual inspection and debugging.