API Reference

WebdriverIO

Next-gen browser and mobile automation test framework for Node.js that drives WebDriver sessions.

Official Documentation ↗
CompatibilityThis documentation covers version v8. Check the official docs for the latest API surface.

Installation

npmnpm install --save-dev @wdio/cli

Methods

WebdriverIO provides a concise browser object with commands and assertions over the WebDriver protocol.

Key Features

  • Unified API for browser and mobile
  • Rich selectors and wait commands
  • Service and reporter ecosystem

Usage Notes

Pin a version and check the official docs for the API surface you depend on before upgrading.

Errors

The official API reference declares the following error types:

  • StrictSelectorError (throws a StrictSelectorError rather than silently returning the first match) — official text: “As of v10 this command is strict : if the selector resolves to more than one element it throws a StrictSelectorError rather than silently returning the first match.” (source: https://webdriver.io/docs/api/browser/%24/, fetched 2026-11-08T09:53:13.312Z)

API reference evidence

Fetched from official sources on 2026-11-08T09:53:13.312Z via WebFetch https://webdriver.io/docs/api/browser/url/.

FAQ

Why do I need explicit waits?
Automation runs faster than rendering. waitForDisplayed and related commands poll until the condition holds, avoiding flaky fixed sleeps.
How do I run tests in parallel?
Set maxInstances in wdio.conf so the runner starts multiple sessions, each isolated in its own worker process.
Does it support mobile devices?
Yes. Point the capabilities at Appium, which WebdriverIO drives for native and hybrid mobile apps.