diff --git a/packages/playwright-test/src/reporters/html.ts b/packages/playwright-test/src/reporters/html.ts index 4b95c7e793..eaa026dc75 100644 --- a/packages/playwright-test/src/reporters/html.ts +++ b/packages/playwright-test/src/reporters/html.ts @@ -219,7 +219,7 @@ export async function showHTMLReport(reportFolder: string | undefined, testId?: console.log(colors.cyan(` Serving HTML report at ${url}. Press Ctrl+C to quit.`)); if (testId) url += `#?testId=${testId}`; - open(url); + await open(url, { wait: true }).catch(() => console.log(`Failed to open browser on ${url}`)); await new Promise(() => {}); }