Skip to content

Instantly share code, notes, and snippets.

@neodigm
Created October 23, 2017 21:30
Show Gist options
  • Save neodigm/00a54d0c7d9ab8c09ed6da724bcc29cf to your computer and use it in GitHub Desktop.
Save neodigm/00a54d0c7d9ab8c09ed6da724bcc29cf to your computer and use it in GitHub Desktop.
Puppeteer Headless Chrome Sample - Clear Cache - stress test
const puppeteer = require('puppeteer');
(async () => {
for( var i = 1; i < 501; i++){
var browser = await puppeteer.launch({headless: true, slowMo: 1000});
var page = await browser.newPage();
page.setViewport({width: 980, height: 3200});
await page.goto('https://qqqqqqqqqqq');
await page.screenshot({path: 'ltdc_stage_lsc_'+i+'.png'});
await browser.close();
}
})();
@neodigm
Copy link
Author

neodigm commented Oct 24, 2017

npm install puppeteer

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment