Puppeteer – Filmstrip

The code below is to create filmstrip using Puppeteer


const puppeteer = require('puppeteer');

(async () => {
    //const browser = await puppeteer.launch();
  const browser = await puppeteer.launch({
        args: [
        '--no-sandbox',
        '--disable-setuid-sandbox'
        ]
    });
    const page = await browser.newPage();
    // Drag and drop this JSON file to the DevTools Performance panel!
    // Drag and drop this JSON file to the DevTools Performance panel!
    await page.tracing.start({ path: '/screenshots/profile.json', screenshots: true });
    await page.goto('https://www.google.com');
    await page.tracing.stop();
    await browser.close();
})();

Leave a Reply

Your email address will not be published. Required fields are marked *