Skip to content

Instantly share code, notes, and snippets.

@codesorter2015
Created January 10, 2019 14:08
Show Gist options
  • Save codesorter2015/c4edd4366f6b794989bdd95875918ee9 to your computer and use it in GitHub Desktop.
Save codesorter2015/c4edd4366f6b794989bdd95875918ee9 to your computer and use it in GitHub Desktop.
Puppeteer - taking full page screenshot
const puppeteer = require('puppeteer');
(async () => {
const browser = await puppeteer.launch();
const page = await browser.newPage();
await page.goto('https://techmultitude.com');
await page.setViewport({width: 320, height: 480});
await page.waitForNavigation({'waitUntil' : 'networkidle'});
await page.screenshot({path: 'website.png', fullPage: true});
await browser.close();
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment