chore: restore page-side timeout (#213)

This commit is contained in:
Pavel Feldman
2025-04-17 14:25:27 -07:00
committed by GitHub
parent 6481100bdf
commit 6a070a0dd8

View File

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