mirror of
https://github.com/microsoft/playwright-mcp.git
synced 2025-07-27 00:52:27 +08:00
increase download waiting
This commit is contained in:
parent
6c98594b7a
commit
43d4d6f0bb
@ -83,11 +83,10 @@ export class Tab {
|
|||||||
|| e.message.includes('Download is starting'); // firefox + webkit
|
|| e.message.includes('Download is starting'); // firefox + webkit
|
||||||
if (!mightBeDownload)
|
if (!mightBeDownload)
|
||||||
throw e;
|
throw e;
|
||||||
|
|
||||||
// on chromium, the download event is fired *after* page.goto rejects, so we wait a lil bit
|
// on chromium, the download event is fired *after* page.goto rejects, so we wait a lil bit
|
||||||
const download = await Promise.race([
|
const download = await Promise.race([
|
||||||
downloadEvent,
|
downloadEvent,
|
||||||
new Promise(resolve => setTimeout(resolve, 500)),
|
new Promise(resolve => setTimeout(resolve, process.platform === 'win32' ? 1000 : 500)),
|
||||||
]);
|
]);
|
||||||
if (!download)
|
if (!download)
|
||||||
throw e;
|
throw e;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user