Trying to scrape a page with Puppeteer in Node.js. Report generation waits for a JS function evaluation. Example:
console.log('Navigating...');
await page.goto('https://example.com', { waitUntil: 'networkidle0' });
await page.waitForFunction(() => document.getElementById('status').textContent.includes('done'));
How can I delay further actions?