mirror of
https://github.com/microsoft/playwright-mcp.git
synced 2025-07-26 16:42:27 +08:00
chore: restore page-side timeout (#213)
This commit is contained in:
parent
6481100bdf
commit
6a070a0dd8
@ -199,7 +199,7 @@ ${code.join('\n')}
|
|||||||
|
|
||||||
async waitForTimeout(time: number) {
|
async waitForTimeout(time: number) {
|
||||||
if (this._currentTab && !this._javaScriptBlocked())
|
if (this._currentTab && !this._javaScriptBlocked())
|
||||||
await this._currentTab.page.waitForTimeout(time);
|
await this._currentTab.page.evaluate(() => new Promise(f => setTimeout(f, 1000)));
|
||||||
else
|
else
|
||||||
await new Promise(f => setTimeout(f, time));
|
await new Promise(f => setTimeout(f, time));
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user