We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
for (const [i, u] of url.entries()) { const page = await browserContext.newPage({ userAgent: 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/104.0.0.0 Safari/537.36' }); promises.push(page.goto(u, { waitUntil: "domcontentloaded" }).then(async (resp) => { try { await page.waitForLoadState('load', { timeout: 10000 }); } catch (ex) {} // Adapt viewport height to scroll height await page.waitForTimeout(500); await pages.adjustViewportToPage(page, optionsViewportAdjust); await page.waitForTimeout(1000); try { await page.waitForLoadState('networkidle', { timeout: 15000 }); } catch (ex) {} // Take snapshot const snapName = url.length > 1 ? `snapshot-${i}` : "snapshot"; await pages.takeSnapshot(page, Object.assign( {path: path.join(outputDirectory, snapName)}, scriptOptions[SCRIPT_OPTIONS_SNAPSHOT] )); })); }
Nice idea to use domcontentloaded and then wait for load with timeout.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Nice idea to use domcontentloaded and then wait for load with timeout.
The text was updated successfully, but these errors were encountered: