Skip to content

Instantly share code, notes, and snippets.

@kand617
Last active March 17, 2019 14:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kand617/c7555dd6ed8d7d75f219793f1006635b to your computer and use it in GitHub Desktop.
Save kand617/c7555dd6ed8d7d75f219793f1006635b to your computer and use it in GitHub Desktop.
const puppeteer = require('puppeteer');
(async () => {
const browser = await puppeteer.launch({
args: [
// Required for Docker version of Puppeteer
'--no-sandbox',
]
});
const page = await browser.newPage();
await page.goto('https://example.com');
await page.screenshot({path: 'example.png'});
await browser.close();
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment