mirror of
https://github.com/OneUptime/oneuptime
synced 2024-11-23 07:42:10 +00:00
Add waitUntil option to page.setContent for improved reliability in screenshot capture
This commit is contained in:
parent
03e063c35b
commit
bbc2e306f4
@ -30,7 +30,9 @@ export default class BrowserUtil {
|
||||
|
||||
const page: Page = pageAndBrowser.page;
|
||||
const browser: Browser = pageAndBrowser.browser;
|
||||
await page.setContent(html);
|
||||
await page.setContent(html, {
|
||||
waitUntil: "domcontentloaded",
|
||||
});
|
||||
const screenshot: Buffer = await page.screenshot({ type: "png" });
|
||||
|
||||
await browser.close();
|
||||
|
Loading…
Reference in New Issue
Block a user