Skip to main content

Playwright traces

A Playwright trace records what the browser did — every action, with screenshots, DOM snapshots, network traffic and console output. Normally you find the zip it was written to and open it in a viewer. If your steps drive a browser and record a trace per step, the plugin brings that viewer to the step instead: the trace opens under the step, in the spec file you are already reading.

Reading a trace in the editor

Traces ride in with published reporter entries, so they appear wherever those do: use the published-entries button on the editor toolbar to open the panels across the spec file.

<A snippet of the editor toolbar with the published-entries button, shown pressed while its panels are open.>

A step with a recorded trace then shows a collapsed Playwright trace row beneath it. Click the file name and the trace viewer opens inline, in the editor — the same viewer you would get from the zip, with its screenshots, DOM snapshots, network, console and action timeline.

<A failed step in a spec file with its Playwright trace panel open below it, showing the action timeline and a screenshot.>

Opening it full size in the browser

Hovering the row reveals a small beside the file name. Clicking it opens the same trace at full size in Playwright's own hosted viewer, which is worth doing when you want the whole window view.

<A snippet of a collapsed Playwright trace row under a step, hovered, with the ↗ visible beside the file name.>

Nothing is uploaded. The plugin serves the zip from http://127.0.0.1 on your own machine, and the hosted viewer page fetches it from there, so the recording never leaves the machine that made it.

The hosted viewer is loaded from trace.playwright.dev, so opening one full size needs an internet connection. The inline viewer in the spec does not.

Turning it on

Traces arrive with published reporter entries, so the two are controlled together under Settings → Tools → SpecBinder → Execution results: switch on Show published JUnit reporter entries, then Show Playwright traces beneath it. With traces off, a trace stays visible as an ordinary published-entry row rather than disappearing.

<The Extra data section of Settings → Tools → SpecBinder → Execution results, with Show published JUnit reporter entries ticked and Show Playwright traces indented beneath it.>