mirror of
https://github.com/microsoft/playwright-mcp.git
synced 2025-07-26 08:32:26 +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
|
||||
if (!mightBeDownload)
|
||||
throw e;
|
||||
|
||||
// on chromium, the download event is fired *after* page.goto rejects, so we wait a lil bit
|
||||
const download = await Promise.race([
|
||||
downloadEvent,
|
||||
new Promise(resolve => setTimeout(resolve, 500)),
|
||||
new Promise(resolve => setTimeout(resolve, process.platform === 'win32' ? 1000 : 500)),
|
||||
]);
|
||||
if (!download)
|
||||
throw e;
|
||||
|
Loading…
x
Reference in New Issue
Block a user