Last active
March 22, 2019 10:53
-
-
Save bmorelli25/e8069ac084348ca44207d16f5cd5d6cc to your computer and use it in GitHub Desktop.
Screenshot with Puppeteer
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 function getPic() { | |
| const browser = await puppeteer.launch(); | |
| const page = await browser.newPage(); | |
| await page.goto('https://google.com'); | |
| await page.screenshot({path: 'google.png'}); | |
| await browser.close(); | |
| } | |
| getPic(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment