diff --git a/core/util/runPlaywright.js b/core/util/runPlaywright.js index 3aaac1e7..290ee68d 100644 --- a/core/util/runPlaywright.js +++ b/core/util/runPlaywright.js @@ -440,6 +440,7 @@ async function captureScreenshot (page, browserContext, selector, selectorMap, c ensureDirectoryPath(filePath); try { + await page.waitForFunction(() => document.fonts.ready); await page.screenshot({ path: filePath, fullPage diff --git a/core/util/runPuppet.js b/core/util/runPuppet.js index 5c5ef7f8..40f07402 100644 --- a/core/util/runPuppet.js +++ b/core/util/runPuppet.js @@ -394,6 +394,7 @@ async function captureScreenshot (page, browser, selector, selectorMap, config, ensureDirectoryPath(filePath); // logs in same dir try { + await page.waitForFunction(() => document.fonts.ready); await page.screenshot({ path: filePath, fullPage