From 7d7e9d63a7af66618784861c947f49691734d19d Mon Sep 17 00:00:00 2001 From: lowlighter <22963968+lowlighter@users.noreply.github.com> Date: Sun, 20 Nov 2022 06:46:30 -0500 Subject: [PATCH] fix(plugins/community/screenshot): wait for idle network and dom loaded [skip ci] --- source/plugins/community/screenshot/index.mjs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/plugins/community/screenshot/index.mjs b/source/plugins/community/screenshot/index.mjs index 6c5d7259..82f91dfc 100644 --- a/source/plugins/community/screenshot/index.mjs +++ b/source/plugins/community/screenshot/index.mjs @@ -18,7 +18,7 @@ export default async function({login, q, imports, data, account}, {enabled = fal const page = await browser.newPage() await page.setViewport({width: 1280, height: 1280}) console.debug(`metrics/compute/${login}/plugins > screenshot > loading ${url}`) - await page.goto(url) + await page.goto(url, {waitUntil:["domcontentloaded", "networkidle2"]}) //Screenshot await page.waitForSelector(selector)