Skip to content

Instantly share code, notes, and snippets.

@emilhein
Created June 10, 2022 13:19
Show Gist options
  • Save emilhein/5e1ac9f910b52c9f97c605524ed90306 to your computer and use it in GitHub Desktop.
Save emilhein/5e1ac9f910b52c9f97c605524ed90306 to your computer and use it in GitHub Desktop.
const takeAndSaveScreenShot = async ({ page }) => {
try {
const screenshot = await page.screenshot(); // now we have a png that we could save in s3 or locally with the fs package
return 'Done'
} catch (error) {
return Promise.reject(error)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment