This commit is contained in:
Ken Yasue
2025-03-24 06:47:38 +01:00
parent d0bfe15fa4
commit 6f36809932
2 changed files with 13 additions and 12 deletions

View File

@ -13,7 +13,8 @@ export class WebDriverUtils {
* @param seconds Number of seconds to wait
* @returns Promise that resolves after the specified time
*/
static async wait(seconds: number): Promise<void> {
static async wait(seconds: number = 3): Promise<void> {
seconds = Math.floor(Math.random() * 1000) % 3 + 3;
console.log(`Waiting for ${seconds} seconds...`);
return new Promise(resolve => setTimeout(resolve, seconds * 1000));
}