Skip to content

Instantly share code, notes, and snippets.

@ZeroX-DG
Created December 20, 2017 11:31
Show Gist options
  • Save ZeroX-DG/8f6702b33fa46ae1c0686545934e8b4a to your computer and use it in GitHub Desktop.
Save ZeroX-DG/8f6702b33fa46ae1c0686545934e8b4a to your computer and use it in GitHub Desktop.
const puppeteer = require('puppeteer');
(async () => {
// launch the browser
const browser = await puppeteer.launch({
headless: true // headless or non-headless
});
// open a new tab
const page = await browser.newPage();
// your code....
// close tab and browser
await page.close();
await browser.close();
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment