Playwright is a framework for Web Testing and Automation. It allows testing Chromium, Firefox and WebKit with a single API.
TypeScript automationchromechromiume2e-testingelectronend-to-end-testingfirefoxjavascriptplaywrighttesttest-automationtestingtesting-toolswebwebkit
chore: do not show the open error (#23547)
Pavel Feldman6351630af25c
diff --git a/packages/playwright-core/src/server/trace/viewer/traceViewer.ts b/packages/playwright-core/src/server/trace/viewer/traceViewer.tsindex 3cc13c70a4..06e4ef7d6b 100644--- a/packages/playwright-core/src/server/trace/viewer/traceViewer.ts+++ b/packages/playwright-core/src/server/trace/viewer/traceViewer.ts@@ -184,8 +184,7 @@ async function openTraceInBrowser(traceUrls: string[], options?: Options) {const { url } = await startTraceViewerServer(traceUrls, options);// eslint-disable-next-line no-consoleconsole.log('\nListening on ' + url);- // eslint-disable-next-line no-console- await open(url, { wait: true }).catch(() => console.log(`Failed to open browser on ${url}`));+ await open(url, { wait: true }).catch(() => {});}class StdinServer {diff --git a/packages/playwright-test/src/reporters/html.ts b/packages/playwright-test/src/reporters/html.tsindex 9aac3e3f44..0a15a4e40f 100644--- a/packages/playwright-test/src/reporters/html.ts+++ b/packages/playwright-test/src/reporters/html.ts@@ -164,7 +164,7 @@ export async function showHTMLReport(reportFolder: string | undefined, host: strconsole.log(colors.cyan(` Serving HTML report at ${url}. Press Ctrl+C to quit.`));if (testId)url += `#?testId=${testId}`;- await open(url, { wait: true }).catch(() => console.log(`Failed to open browser on ${url}`));+ await open(url, { wait: true }).catch(() => {});await new Promise(() => {});}