From 6a070a0dd88890bc38a00b51149732c174b330e7 Mon Sep 17 00:00:00 2001 From: Pavel Feldman Date: Thu, 17 Apr 2025 14:25:27 -0700 Subject: [PATCH] chore: restore page-side timeout (#213) --- src/context.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/context.ts b/src/context.ts index 26a04d4..3b08461 100644 --- a/src/context.ts +++ b/src/context.ts @@ -199,7 +199,7 @@ ${code.join('\n')} async waitForTimeout(time: number) { if (this._currentTab && !this._javaScriptBlocked()) - await this._currentTab.page.waitForTimeout(time); + await this._currentTab.page.evaluate(() => new Promise(f => setTimeout(f, 1000))); else await new Promise(f => setTimeout(f, time)); }