Trace Mode
Headless capture path — no DevTools UI window opens. At session end the adapter writes a trace-<sessionId>.zip (or trace-<sessionId>/ directory) next to your spec / config file. The artifact is portable and ships everything needed for offline replay, AI-agent diffing, or any consumer that prefers a file over a live UI.
Trace mode is mutually exclusive with live mode. Pick one per session: humans debugging interactively want live; agents diffing runs or CI bots collecting artifacts want trace.
Enable
// wdio.conf.ts
services: [
[
'devtools',
{
mode: 'trace',
traceFormat: 'zip' // optional; 'zip' (default) | 'ndjson-directory'
}
]
]
A complete, copy-pasteable reference config ships at examples/wdio/wdio.trace.conf.ts.
Selenium and Nightwatch ship the same trace pipeline — see their adapter pages for framework-specific enable syntax: Selenium · Nightwatch.