Skip to content

playwright: disable HTML reporter auto-open#366

Merged
taybenlor merged 1 commit into
taybenlor:mainfrom
liverpoolie:playwright/disable-auto-open-html
Apr 21, 2026
Merged

playwright: disable HTML reporter auto-open#366
taybenlor merged 1 commit into
taybenlor:mainfrom
liverpoolie:playwright/disable-auto-open-html

Conversation

@liverpoolie

Copy link
Copy Markdown
Contributor

Summary

Change both playwright.config.ts files (packages/runtime, packages/wasi) from reporter: "html" to reporter: [["html", { open: "never" }]].

Why

On macOS the default html reporter auto-opens the report by spawning open --wait-apps <url>, which blocks until the launched browser exits. For anyone running Playwright non-interactively (CI runners without CI=1, agent-driven shells, background tooling), the invoking shell never returns — the process just hangs on the open --wait-apps child.

With open: "never" the report is still generated on disk and can be viewed manually via npx playwright show-report; Playwright just won't auto-launch a browser on completion.

Test plan

  • Run npx playwright test in packages/wasi — run finishes, shell returns, no browser auto-launched.
  • Run npx playwright show-report — report still renders.
  • Same for packages/runtime.

Default reporter "html" opens the report via `open --wait-apps` on
macOS, which blocks until the launched browser exits. When Playwright
is driven by an agent (no interactive user to close the window), the
shell never returns — burning the calling process until something
else kills it.

Switch both configs to `[["html", { open: "never" }]]` so the report
is still generated but not auto-opened.

@taybenlor taybenlor left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@taybenlor taybenlor enabled auto-merge (squash) April 21, 2026 10:29
@taybenlor taybenlor merged commit d1c7ceb into taybenlor:main Apr 21, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants