Skip to content

Commit

Permalink
Update puppeteer.js
Browse files Browse the repository at this point in the history
Add timeout
  • Loading branch information
hidaviddong authored Jul 19, 2024
1 parent c3ab671 commit cfa4399
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/puppeteer.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ await page.goto("https://typst.app/project/rIWFtNvpmsgHgh18iqpk2a");

try {
// 等待带有aria-label="Quick export PDF"的按钮出现,最多等待10秒钟
await page.waitForSelector('button[aria-label="Quick export PDF"]', { timeout: 10000 });
await page.waitForSelector('button[aria-label="Quick export PDF"]', { timeout: 20000 });
console.log('页面加载完毕')
// 找到并点击带有aria-label="Quick export PDF"的按钮
const quickExportPDFButton = await page.$('button[aria-label="Quick export PDF"]');
Expand Down

0 comments on commit cfa4399

Please sign in to comment.