소스 검색

feat: add timeout

周玉环 2 주 전
부모
커밋
bf7546944e
1개의 변경된 파일2개의 추가작업 그리고 1개의 파일을 삭제
  1. 2 1
      server/script-browser.js

+ 2 - 1
server/script-browser.js

@@ -29,7 +29,8 @@ export default async function () {
   // targetUrlWithoutProtocol = targetUrlWithoutProtocol.replace('https://', '');
   try {
     await page.goto(targetUrl, {
-      timeout: 60000
+      timeout: 60000,
+      waitUntil: 'domcontentloaded'
     });
     await page.screenshot({ path: `screenshots/screenshot_${timeStamp}.png` });
   } finally {