Skip to content

Instantly share code, notes, and snippets.

@joelgriffith
Last active September 20, 2017 04:03
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 joelgriffith/c38985f1c821039517fa0888ae9a47a6 to your computer and use it in GitHub Desktop.
Save joelgriffith/c38985f1c821039517fa0888ae9a47a6 to your computer and use it in GitHub Desktop.
Compares headless libraries
// Puppeteer
const puppeteer = require('puppeteer');
const browser = await puppeteer.launch();
const page = await browser.newPage();
await page.goto('https://example.com');
await page.screenshot({path: 'example.png'});
await browser.close();
// Chromeless
const chromeless = new Chromeless()
const screenshot = await chromeless
.goto('https://example.com')
.screenshot()
console.log(screenshot)
await chromeless.end()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment