Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Some links on this page are affiliate links: if you buy through them we may earn a commission, at no extra cost to you.

Run npx playwright show-report from your project directory. Playwright starts a local web server for the generated HTML report and opens it in your browser. If the report is somewhere else, add that folder name, for example npx playwright show-report my-report. Opening index.html directly from your file manager can fail because the report is designed to be served over HTTP.

Open the default Playwright report

After a test run that uses Playwright’s HTML reporter, the report is normally written to a folder named playwright-report. In the directory containing your Playwright project, run:

npx playwright show-report

The command serves that folder locally and opens the report in a browser. It does not rerun your tests; it displays the report that has already been generated.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Run it from the right directory

  1. Open a terminal.
  2. Change to the project directory that contains your Playwright configuration and report folder, for example cd path/to/your-project.
  3. Run npx playwright show-report.
  4. Wait for the browser window or tab to open. If it does not, copy the local address printed by the command into your browser.

Open a report in another folder

Pass the report directory as an argument when the HTML output is not in the default location:

npx playwright show-report my-report

Replace my-report with the path to the folder that contains the report. Relative paths are resolved from your current terminal directory; an absolute path also works.

npx playwright show-report ./artifacts/playwright-report
npx playwright show-report /tmp/ci-report

The folder name may be different when your Playwright configuration sets the HTML reporter’s outputFolder, or when the PLAYWRIGHT_HTML_OUTPUT_DIR environment variable changes the destination. Use the actual output directory in the command.

Open a downloaded CI report

CI systems commonly publish the report as an artifact. Extract the archive first, then point show-report at the extracted directory:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  1. Download the CI artifact.
  2. Extract it so that the report’s index.html is at the top level of the directory you will use.
  3. Change into the directory that contains the extracted report, or keep your current directory and provide its path.
  4. Run npx playwright show-report extracted-report.

Playwright also accepts a .zip archive when index.html is at the archive’s top level:

npx playwright show-report report.zip

If the archive contains an extra wrapping directory, extract it and pass the inner directory instead. A quick check is to list the archive or extracted folder and verify that index.html is directly inside the path you supplied.

Why double-clicking index.html can fail

The HTML reporter produces a self-contained folder that contains the test-run report and is intended to be served as a web page. Double-clicking the file opens it with a file:// URL instead of through a local web server. Browser security rules and the report’s asset-loading behavior can prevent the interface, traces, or other resources from working correctly in that mode.

npx playwright show-report supplies the missing server. The documented defaults are host localhost and port 9323, so the normal address is equivalent to http://localhost:9323. Keep the terminal process running while you view the report; stopping it stops the local server.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Change the host or port

Use the command-line options when port 9323 is already occupied, when you need a different local interface, or when another tool must connect to the report server:

npx playwright show-report --port 9400
npx playwright show-report --host 127.0.0.1 --port 9400
npx playwright show-report my-report --host localhost --port 9500

Open the resulting host-and-port address shown in the terminal. A port change affects only the local server; it does not change where the report files are stored.

Choosing a host carefully

localhost keeps the report on the local machine. If you deliberately bind to another interface for access from a separate device, treat the report as potentially sensitive: test output can contain URLs, stack traces, screenshots, and application data. Use a protected network and stop the server when you are finished.

Control whether Playwright opens a browser automatically

The HTML reporter’s open setting controls automatic browser launching. Its accepted values are:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Value Behavior When to use it
always Open the report after every run. Local development when you want immediate feedback.
never Do not launch a browser automatically. Headless CI jobs or scripts.
on-failure Open only when the test run fails. Keeping successful runs quiet while inspecting failures.

The PLAYWRIGHT_HTML_OPEN environment variable can also set this behavior. For a one-time shell override, set it before running your tests:

PLAYWRIGHT_HTML_OPEN=never npx playwright test
PLAYWRIGHT_HTML_OPEN=always npx playwright test

On Windows PowerShell, use:

$env:PLAYWRIGHT_HTML_OPEN = "never"
npx playwright test

These settings affect automatic opening after report generation. They do not replace npx playwright show-report; you can use that command later to serve an existing report.

Common problems and fixes

“Cannot find” the report

Symptom: The command cannot locate a report or starts with an empty location.

Cause: You are in the wrong directory, the report uses a custom output folder, or the CI artifact was extracted one level deeper than expected.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Fix: Locate the directory that contains index.html, then pass that directory explicitly:

npx playwright show-report path/to/the/folder

Check your reporter outputFolder setting and the value of PLAYWRIGHT_HTML_OUTPUT_DIR if the folder name is not playwright-report.

The browser does not open

Symptom: The terminal starts serving, but no browser window appears.

Fix: Read the host and port printed by the command and enter that address manually. Automatic opening is controlled by the reporter’s open option and PLAYWRIGHT_HTML_OPEN; a value of never intentionally suppresses the launch.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Port 9323 is already in use

Symptom: The server cannot bind to the default port.

Fix: Select an unused port:

npx playwright show-report --port 9400

Use the new address printed in the terminal. If you have several report servers running, stop the old process or assign each one a different port.

The page is blank or assets do not load when opened directly

Cause: The file was opened with a file:// URL.

Fix: Close that tab and serve the report with npx playwright show-report. Do not attempt to repair the report by moving individual JavaScript or data files; the folder structure must remain intact.

A ZIP archive does not work

Cause: index.html is not at the archive’s top level, or the archive is not a Playwright HTML-report folder.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Fix: Extract the ZIP, inspect its directory tree, and pass the directory in which index.html is directly located. If the report was nested under a wrapper directory, use that inner path.

The report stops responding

Cause: The terminal running the server was closed, suspended, or interrupted.

Fix: Start the command again and leave that terminal session running while you browse the report. A new server can use another port if the previous process has not released 9323.

A repeatable workflow for local and CI use

  1. Generate the HTML report with your normal Playwright test command.
  2. Confirm the output directory, either playwright-report or the configured custom folder.
  3. For local work, run npx playwright show-report.
  4. For a custom location, run npx playwright show-report <folder>.
  5. For CI, download and extract the artifact, verify that index.html is at the supplied path’s top level, and serve that directory.
  6. If 9323 is unavailable, add --port; if automatic opening is undesirable, set the reporter’s open option or PLAYWRIGHT_HTML_OPEN=never.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Or skip the browser setup

If your goal is to create an image or PDF of a report that is available at a reachable URL, ScreenshotNeo provides a single-request alternative. It accepts consent banners before capture and removes more than 60 known consent platforms, newsletter popups and chat widgets; each step can be disabled. Bot checks, CAPTCHAs, blank pages, timeouts, failed loads and cache hits are not billed, and response headers identify the page verdict and whether the request was billed. Its MCP server provides take_screenshot, get_page_info and capture_pdf tools for Claude, Cursor and other MCP clients. The free plan includes 1,000 screenshots per month with no card, and paid plans start at $5 for 3,000 shots.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

See the ScreenshotNeo API documentation for parameter details. These examples capture a publicly reachable page; a report that exists only on your computer at localhost is not directly reachable by an external service.

cURL

curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp

Python

import requests
r = requests.get("https://api.screenshotneo.com/v1/shot", params={"access_key": "YOUR_API_KEY", "url": "https://stripe.com"}, timeout=90)
open("shot.webp", "wb").write(r.content)

Node.js

const q = new URLSearchParams({ access_key: 'YOUR_API_KEY', url: 'https://stripe.com' });
const res = await fetch(`https://api.screenshotneo.com/v1/shot?${q}`);

Create a free ScreenshotNeo account to get 1,000 screenshots a month with no card.

FAQ

Does show-report change the test results?

No. It serves the files already written by the HTML reporter; generating a new report requires running the tests again.

Can I keep multiple reports available at once?

Yes. Start a separate server for each report directory and assign a different port to each process.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

What should I archive from CI?

Archive the complete HTML-report folder, not only index.html. The interface depends on the accompanying assets and report data.

Frequently Asked Questions

Does show-report change the test results?

No. It serves the files already written by the HTML reporter; generating a new report requires running the tests again.

Can I keep multiple reports available at once?

Yes. Start a separate server for each report directory and assign a different port to each process.

What should I archive from CI?

Archive the complete HTML-report folder, not only index.html. The interface depends on the accompanying assets and report data.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.