It would be amazing to have the ability to customize the Puppeteer script that runs. For example, we have some sites that require us to Load the page, add to local storage a cookie (to accept TOS to avoid pop-ups), and then load the page again and then screenshot/create PDF/PNG.
It would be amazing to have the ability to customize the Puppeteer script that runs. For example, we have some sites that require us to Load the page, add to local storage a cookie (to accept TOS to avoid pop-ups), and then load the page again and then screenshot/create PDF/PNG.
(async () => { const browser = await puppeteer.launch(); const page = await browser.newPage();
await page.goto('http://localhost:8080/');
await page.evaluate(() => { localStorage.setItem('token', 'example-token'); });
await page.goto('http://localhost:8080/');