1const puppeteer = require('puppeteer');
2
3(async () => {
4 const browser = await puppeteer.launch();
5 const page = await browser.newPage();
6 await page.goto('https://example.com');
7 await page.screenshot({ path: 'example.png' });
8
9 await browser.close();
10})();