Prerequisites | Installation | Manual | InitOptions | StartOptions | FAQ
Puppeteer mass screenshots is a simple Puppeteer's plugin to create automatic screenshots for every new frame appears in the browser.
Unlike the regular screenshots function supplied by Puppeteer, our plugin runs on Chrome's API and doesn't affect Puppeteer's run time.
So basically by using this plugin, you'll be able to create very fast screenshots, and it won't slow your run time
In order to use this plugin:
- Puppeteer must be installed.
- Pupepteer's page object must be created.
To install the plugin to your project please use:
npm install puppeteer-mass-screenshots
You'll probably prefer to add it to your package.json file so you can use:
npm install --save-prod puppeteer-mass-screenshots
Once Puppeteer mass screenshots is installed, you can require it in your project:
const PuppeteerMassScreenshots = require('puppeteer-mass-screenshots');
In your constructor create:
const screenshots = new PuppeteerMassScreenshots();
After you have page object
await screenshots.init(page, screenshotsPath);
- page - Puppeteer page object (related to the browser).
- screenshotsPath - where to save the created images
To start the automatic screenshots:
await screenshots.start();
To stop the automatic screenshots:
await screenshots.stop();
Important - call screenshots.stop before browser is closed.
Yes, it does.
it supports Chrome in headless / headful mode.
Yes, it does.
This plugin is based on Chrome's API,
which isn't affected by page's redirections.
No, it doesn't use the window object.
Yes.
put the page object in the init function, and the plugin will use it.
No, it won't.
We use Chrome's API only.
init options - see our Init options page
start options - see our Start options page