Last active
September 20, 2017 04:03
-
-
Save joelgriffith/c38985f1c821039517fa0888ae9a47a6 to your computer and use it in GitHub Desktop.
Compares headless libraries
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
// 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