WebDriverIO DevTools
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.
Installation
npm install @wdio/devtools-service --save-dev
Usage
Test Runner
// wdio.conf.ts
export const config = {
services: ['devtools'],
}
Standalone
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()
Service Options
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) |
Getting Started
- Run your WebdriverIO tests
- The DevTools UI automatically opens in an external browser window
- Tests begin executing immediately with real-time visualization
- View live browser preview, test progress, and command execution
- After initial run completes, use play buttons to rerun individual tests or suites
- Click stop button anytime to terminate running tests
- Explore actions, metadata, console logs, and source code in the workbench tabs
Features
Explore the WebDriverIO DevTools features in detail:
- Interactive Test Rerunning & Visualization - Real-time browser previews with test rerunning
- Multi-Framework Support - Works with Mocha, Jasmine, and Cucumber
- Console Logs - Capture and inspect browser console output
- Network Logs - Monitor API calls and network activity
- TestLens - Navigate to source code with intelligent code navigation
- Session Screencast - Automatic video recording of browser sessions