Created
January 10, 2019 14:08
-
-
Save codesorter2015/c4edd4366f6b794989bdd95875918ee9 to your computer and use it in GitHub Desktop.
Puppeteer - taking full page screenshot
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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