Created
January 21, 2018 20:25
-
-
Save henrikhaugboelle/ba715feb49eb176a364d2abbc631ddf3 to your computer and use it in GitHub Desktop.
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
module.exports = async () => { | |
const page = await browser.newPage() | |
await page.goto('https://www.example.com', { | |
waitUntil: 'networkidle' | |
}) | |
// const html = await page.content() | |
const buffer = await page.screenshot() | |
await page.close() | |
return { | |
image: buffer.toString('base64') | |
// html | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment