Created
September 23, 2019 12:18
-
-
Save QAProvider/d2fb7cf8382656e4185315e59518652a to your computer and use it in GitHub Desktop.
Puppeteer first test
This file contains 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
const puppeteer = require('puppeteer'); | |
(async () => { | |
const browser = await puppeteer.launch(); | |
const page = await browser.newPage(); | |
await page.setViewport({ | |
width: 640, | |
height: 480, | |
deviceScaleFactor: 1, | |
}); | |
await page.goto('https://qaprovider.com'); | |
await page.screenshot({path: 'qaprovider640x480.png'}); | |
await page.setViewport({ | |
width: 800, | |
height: 600, | |
deviceScaleFactor: 1, | |
}); | |
await page.screenshot({path: 'qaprovider800x600.png'}); | |
await page.setViewport({ | |
width: 1024, | |
height: 768, | |
deviceScaleFactor: 1, | |
}); | |
await page.screenshot({path: 'qaprovider1024x768.png'}); | |
await browser.close(); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment