website/docs/devtools/Wdio.md
A WebdriverIO service that provides a developer tools UI for running, debugging, and inspecting browser automation tests. Features include DOM mutation replay, per-command screenshots, network request inspection, console log capture, and session screencast recording.
npm install @wdio/devtools-service --save-dev
// wdio.conf.ts
export const config = {
services: ['devtools'],
}
import { remote } from 'webdriverio'
import { setupForDevtools } from '@wdio/devtools-service'
const browser = await remote(setupForDevtools({
capabilities: { browserName: 'chrome' }
}))
await browser.url('https://example.com')
await browser.deleteSession()
services: [['devtools', options]]
| Option | Type | Default | Description |
|---|---|---|---|
port | number | random | Port the DevTools UI server listens on |
hostname | string | 'localhost' | Hostname the DevTools UI server binds to |
devtoolsCapabilities | Capabilities | Chrome 1600x1200 | Capabilities used to open the DevTools UI window |
screencast | ScreencastOptions | - | Session video recording (see Screencast) |
mode | 'live' | 'trace' | 'live' | live opens the DevTools UI; trace skips it and writes a portable artifact instead (see Trace Mode) |
traceFormat | 'zip' | 'ndjson-directory' | 'zip' | Trace artifact layout — single archive vs unpacked directory. Only applies when mode: 'trace' |
Explore the WebDriverIO DevTools features in detail:
trace.zip artifact (no UI window); supports zip and ndjson-directory output formats, viewable in playwright show-trace