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)); }