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
npm
npm install --save-dev @wdio/cliMethods
No methods match this filter.
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 aStrictSelectorErrorrather 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 aStrictSelectorErrorrather 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/.
browser.url→ signature from https://webdriver.io/docs/api/browser/url/; official text: “await browser.url(url, { wait, timeout, onBeforeLoad, auth, headers })”$→ signature from https://webdriver.io/docs/api/browser/%24/; official text: “await browser.$(selector, { strict })”element.waitForDisplayed→ signature from https://raw.githubusercontent.com/webdriverio/webdriverio/main/packages/webdriverio/src/commands/element/waitForDisplayed.ts; official text: “export function waitForDisplayed ( this: WebdriverIO.Element, { timeout = this.options.waitforTimeout, interval = this.options.waitforInterval, reverse = false, withinViewport = false, contentVisibilityAuto = true, opaci”
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.
Report a problem with this API docOpens a pre-filled issue on GitHub.