Skip to content

Commit

Permalink
fix: 增加元素等待时间
Browse files Browse the repository at this point in the history
  • Loading branch information
14790897 committed Apr 3, 2024
1 parent c0a5bc3 commit e574e50
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pteer.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ require("dotenv").config();
});

// 等待用户名输入框加载
await page.waitForSelector("#login-account-name");
await page.waitForSelector("#login-account-name", { timeout: 60000 });
// 模拟人类在找到输入框后的短暂停顿
await delayClick(500); // 延迟500毫秒
// 清空输入框并输入用户名
Expand All @@ -41,7 +41,7 @@ require("dotenv").config();
}); // 输入时在每个按键之间添加额外的延迟

// 等待密码输入框加载
await page.waitForSelector("#login-account-password");
await page.waitForSelector("#login-account-password", { timeout: 60000 });
// 模拟人类在输入用户名后的短暂停顿
await delayClick(500);
// 清空输入框并输入密码
Expand Down

0 comments on commit e574e50

Please sign in to comment.