Trace Player
The show-trace player opens any trace produced in Trace Mode in the WebdriverIO DevTools UI itself โ a dedicated, read-only player mode for offline replay, review, and AI-agent diffing.
Demoโ

show-trace โ the first-party playerโ
Open a trace in the DevTools UI:
show-trace trace-<sessionId>.zip # bin on PATH after install
npx show-trace trace-<sessionId>.zip # or via npx
pnpm show-trace trace-<sessionId>.zip # from the devtools monorepo
npx show-trace test-results/ # a folder of per-test zips opens as a list of tests
The show-trace bin ships with each adapter (@wdio/devtools-service, @wdio/nightwatch-devtools, @wdio/selenium-devtools), so it's available in any project that installs one, with no extra dependency. It is also a bin of @wdio/devtools-backend itself, so a project without a JavaScript adapter (for example a Python one) can run npx -p @wdio/devtools-backend show-trace <trace.zip>. It boots the same DevTools UI in a dedicated player mode and opens it in your browser:
- Action list (left) โ the captured commands, with a Metadata tab alongside. A wait is one row with the commands its condition issued nested under it, collapsed unless the wait failed or holds the selected row; see Waits.
- Browser pane (centre) โ the reconstructed page for the selected action (see DOM time-travel below). When the trace carries a filmstrip/video, a Snapshot / Screencast toggle switches to the recorded video.
- Timeline strip (top) โ a filmstrip of thumbnails at their wall-clock positions plus a scrub bar with a draggable playhead. Click a thumbnail or drag anywhere to seek.
- Controls bar โ play/pause, step, and speed.
- Dock tabs (bottom) โ Source, Log, Console, Network, Errors (each badged with its count), plus the player-only A11y and Transcript tabs. Click a Network row for the request detail (headers, timing, status).
- Keyboard shortcuts โ
Spaceplay/pause,โ/โstep between actions,Home/Endjump to first/last,,/.change speed,/focus filter,?show all shortcuts.
Accepts
.zipfiles, or folders searched for them; zip anndjson-directorytrace first, or open it in another compatible viewer. The same shortcuts work in the live dashboard (โ/โwalk the command list,?shows help).
Opening a whole runโ
With traceGranularity: 'test' every test writes its own trace.zip, so a run is a folder of them. Give show-trace the folder, or several zips, and the player lists every trace beside the timeline: one row per test with its outcome, failures first and then in the order they ran. Picking a row plays that trace without reloading (โ/โ move between rows, Enter opens one).
npx show-trace test-results/ # every zip under the folder, subfolders included
npx show-trace a/trace.zip b/trace.zip # several zips
- Each zip is read once, as the list fills in, and kept for when it is picked.
- Anything in the folder that is not a
.zip(screenshots, videos, the artifacts manifest) is skipped. A zip that cannot be opened stays in the list with the reason, and the rest open normally. - A zip records no test state, so the outcome is read from the trace itself: failed when an action or step in it failed, passed when it holds actions and none failed, unknown when it holds none. An assertion library that records no row (a jest
expect, chai) can fail a test whose trace still reads as passed. - One zip opens exactly as before, with no list.
Opening a trace someone else recordedโ
A replayed trace runs no script. The page a trace recorded is rendered in a sandboxed frame, and its scripts, inline event handlers, srcdoc and javascript: URLs are dropped on every update, in show-trace and the live dashboard alike, so a trace from someone else can be opened safely. Its stylesheets and fonts replay from the trace when it stored them (traceResources, on by default); its images, and stylesheets a trace did not store, still load from the site under test.
Opening a trace is still opening a recording of that run: it holds everything the run showed or typed (see Trace Mode Limitations).
Trace player featuresโ
Beyond static frame stepping, the player reconstructs and cross-references the run:
- DOM time-travel โ the browser pane replays the captured DOM-mutation stream (and form field-state โ input
value, checkboxchecked, including fields cleared back to empty) to rebuild the real DOM as of the selected action's time, not just a screenshot. Points that carry no captured frame (assertions, static waits) still show the true page state. - A11y tab + element overlay ("pick locator") โ the A11y tab shows the accessibility tree (roles + accessible names) captured for the selected command. Toggle the element overlay in the browser chrome to outline every element the test interacted with; hover a box to highlight its row in the A11y tree, click to copy a resilient locator. Locators are written in the recording runner's dialect:
a*=Logoutunder WebdriverIO,//a[contains(., "Logout")]with aBy.xpath()caption under Selenium, and plain CSS under Nightwatch with an XPath fallback. On a native Appium session they read asandroid=new UiSelector()โฆor-ios predicate string:โฆ. The link is bidirectional โ hovering a tree row highlights the element back in the snapshot. - Transcript tab + Copy-for-LLM โ the Transcript tab renders the run's
transcript.md(a human/LLM-readable summary in execution order). A one-click Copy bundles the transcript with any failing-command errors as paste-ready context for an LLM. - Timeline input markers โ each action is marked on the scrub bar by kind: keyboard actions as a green bar, pointer actions (which carry a hit point) as a blue dot, others as a plain tick โ so you can read the interaction rhythm at a glance.
- Cucumber nesting โ Cucumber runs nest under their scenario in the action tree. Depth varies by adapter (Selenium nests Feature โ Scenario โ Step, WebdriverIO Scenario โ Step, Nightwatch Feature โ Scenario); see Cross-Framework Support.
- Dense filmstrip scrubbing โ with
filmstripenabled, the timeline packs the dense frames for smooth scrubbing instead of one-frame-per-action jumps.
Other trace viewersโ
Because the artifact uses a portable, standard trace-viewer on-disk format, the same .zip (or directory) also opens in compatible standalone trace viewers, and โ sharing that format โ inside an Allure report's embedded trace viewer (Allure โฅ 2.35). They render:
- Timeline of actions with timings
- Per-action screenshots
- Element snapshots
- Network waterfall
- Console events
For LLM / agent consumption, read transcript.md directly โ it's a tight Markdown rendering of the actions with selectors and values.
The trace pipeline (action-mapping, snapshot serializers, NDJSON writer, zip / directory writer) is shared across adapters via @wdio/devtools-trace, so the artifact shape is identical no matter which adapter produced it โ see Cross-Framework Support.