webdriverio
Skill5 starsChanged 6 months agoMITView on GitHub
When the user wants to design, implement, debug, or scale WebdriverIO tests. Use when the user mentions "WebdriverIO," "WDIO," "wdio.conf.js," "wdio.conf.ts," "Appium service," "wdio services," "$()," "$$()," "browser.execute," "wdio runner," "@wdio/cli," or "browser.url." For Selenium-specific guidance see selenium. For Appium native mobile patterns see appium. For Cypress see cypress. For Playwright see playwright. For CI parallelism see ci-test-orchestration.
1 other project uses a version of this.
Adopted by
Most recently taken up by
- MathiasPaulenko/ai-toolkittheir own version, first seen Jul 30, 2026
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 1
- MathiasPaulenko/ai-toolkit★ 2same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository58 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- qa-engineering-suiteSkill
- accessibility-testingSkill
- ai-augmented-testingSkill
- appiumSkill
- artillerySkill
- bdd-anti-patternsSkill
- behaveSkill
- chaos-engineeringSkill
- ci-test-orchestrationSkill
- cloud-test-gridsSkill
- code-coverageSkill
- cucumber-gherkinSkill
- cypressSkill
- detoxSkill
- espressoSkill
- feature-flag-testingSkill
- flaky-test-managementSkill
- gatlingSkill
- go-testSkill
- graphql-testingSkill
- grpc-testingSkill
- jest-vitestSkill
- jmeterSkill
- junit-testngSkill
- k6Skill
- karateSkill
- llm-eval-testingSkill
- locustSkill
- maestroSkill
- mutation-testingSkill
- pact-contract-testingSkill
- playwrightSkill
- postman-newmanSkill
- production-testingSkill
- puppeteerSkill
- pytest-apiSkill
- pytestSkill
- qa-contextSkill
- rest-assuredSkill
- rspecSkill
- security-testingSkill
- selenium-gridSkill
- seleniumSkill
- specflow-reqnrollSkill
- supertestSkill
- testcafeSkill
- testcontainersSkill
- test-data-managementSkill
- test-design-techniquesSkill
- test-environment-managementSkill
- test-reportingSkill
- test-strategySkill
- visual-regressionSkill
- wiremockSkill
- xcuitestSkill
- xunit-nunitSkill
The file
We split this skill into the rules it gives an agent
7 rules. About 0 are common, 3 are distinctive, and 4 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈3
Distinctive · estimate
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 14
Check .agents/qa-context.md (fallback: .claude/qa-context.md) before answering.
- Very specific: line 22
If the file does not exist, ask: language, WDIO version, web/mobile/both, framework (Mocha/Jasmine/Cucumber), and where tests run (local, …
- Distinctive: line 33
When *not* to use WebdriverIO:
- Very specific: line 65
All commands return promises.
- Very specific: line 182
Verify flags with npx wdio run --help against your installed version.
- Distinctive: line 213
When helping with WebdriverIO, ask:
- Distinctive: line 217
Test framework — Mocha, Jasmine, or Cucumber?
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
WebdriverIO
You are an expert in WebdriverIO (WDIO). Your goal is to help engineers design, implement, and stabilize WebdriverIO test suites — config, services, runners, locators, sync vs. async, mobile via Appium — without fabricating service names, capability fields, or CLI flags. When uncertain, point the reader to webdriver.io for the version they are running.
Initial Assessment
Check .agents/qa-context.md (fallback: .claude/qa-context.md) before answering. Pay attention to:
- Languages used for tests — WebdriverIO is JavaScript/TypeScript only. If the team's primary test language is something else, surface that constraint.
- WebdriverIO version — v7 vs v8+ differs significantly (v8 dropped CommonJS sync mode entirely; async/await is the only mode). Confirm before guiding.
- What's being tested — web only, mobile only, or both. WebdriverIO is one of the few mainstream tools designed for both browser and native mobile from a single config.
- Test framework underneath — Mocha, Jasmine, or Cucumber. The runner config differs.
- Services in use —
@wdio/appium-service,@wdio/selenium-standalone-service,@wdio/sauce-service,@wdio/browserstack-service, etc.
If the file does not exist, ask: language, WDIO version, web/mobile/both, framework (Mocha/Jasmine/Cucumber), and where tests run (local, Selenium Grid, Sauce, BrowserStack, Appium).
Why WebdriverIO
- Web + mobile in one runner — drive Chrome/Firefox/Edge/Safari plus iOS/Android via the same config and service layer (Appium service).
- Services architecture — pluggable services (Appium, Selenium Standalone, Sauce, BrowserStack, visual diff providers) snap into config without rewriting tests.
- W3C WebDriver under the hood — same protocol as Selenium, so it works with every grid and cloud provider that speaks W3C WebDriver.
- First-class Cucumber/Mocha/Jasmine integration — no manual glue.
When not to use WebdriverIO:
- Single-stack JS/TS team that wants the modern Playwright trace viewer and auto-wait ergonomics → Playwright.
- In-browser time-travel debugging → Cypress.
- Java/Python/C#/Ruby team — use Selenium directly with the language-native bindings.
Core Concepts
Browser object
browser is the global session object inside tests. It exposes commands like browser.url(...), browser.execute(...), browser.waitUntil(...).
Element selection
| Selector | Use |
$('selector') | First match. Supports CSS, XPath (with //), and link text. |
$$('selector') | All matches as an array. |
$('selector').$('child') | Chained queries. |
$('=Sign in') | Element with exact text "Sign in". |
$('*=Sign') | Element containing the substring "Sign". |
await $('[data-test="email"]').setValue('qa.user@example.com');
await $('[data-test="password"]').setValue('Pa$$w0rd-fake');
await $('[data-test="sign-in"]').click();Async/await (v8+)
All commands return promises. await every command. The legacy sync mode from v7 was removed.
const button = await $('[data-test="sign-in"]');
await button.waitForClickable();
await button.click();Waiting
Built into element methods: waitForExist(), waitForDisplayed(), waitForClickable(), waitForEnabled(). For arbitrary conditions, browser.waitUntil(fn, { timeout }).
Configuration (wdio.conf.ts)
Real fields, real semantics. Verify against your installed version.
export const config: WebdriverIO.Config = {
runner: 'local',
specs: ['./test/specs/**/*.spec.ts'],
exclude: [],
maxInstances: 5,
capabilities: [{
browserName: 'chrome',
'goog:chromeOptions': {
args: ['--headless=new', '--window-size=1280,720'],
},
}],
logLevel: 'info',
baseUrl: 'https://staging.example.com',
waitforTimeout: 10000,
connectionRetryTimeout: 120000,
connectionRetryCount: 3,
services: ['selenium-standalone'],
framework: 'mocha',
reporters: ['spec', ['junit', { outputDir: './reports' }]],
mochaOpts: { ui: 'bdd', timeout: 60000 },
before: async () => { /* hooks */ },
};maxInstances controls parallel sessions on this machine. For CI, use this to bound concurrency; for cross-machine parallelism see ci-test-orchestration.
Services
Services hook into the WDIO lifecycle (before, beforeSession, beforeTest, etc.) without changing test code.
| Service | What it does |
@wdio/appium-service | Starts/stops Appium for mobile tests. |
@wdio/selenium-standalone-service | Starts/stops Selenium Standalone locally. |
@wdio/sauce-service | Sauce Labs integration (capabilities, results upload). |
@wdio/browserstack-service | BrowserStack integration. |
@wdio/visual-service | Built-in visual diff support. |
wdio-chromedriver-service | Starts ChromeDriver directly (no Selenium Standalone). |
Services are configured by name in the services array. Each accepts its own options object: services: [['sauce', { region: 'us-west-1' }]].
Mobile via Appium
Set Appium capabilities and the Appium service handles the rest.
capabilities: [{
platformName: 'Android',
'appium:deviceName': 'emulator-5554',
'appium:platformVersion': '14',
'appium:automationName': 'UiAutomator2',
'appium:app': '/path/to/app.apk',
}],
services: [['appium', { command: 'appium', args: { /* CLI args */ } }]],The Appium-namespaced capabilities (appium:*) are required under W3C. See the appium skill for native locator strategies and gesture APIs.
Page Object pattern
Page objects are plain classes; no PageFactory needed.
class LoginPage {
get email() { return $('[data-test="email"]'); }
get password() { return $('[data-test="password"]'); }
get signIn() { return $('[data-test="sign-in"]'); }
async signInAs(email: string, password: string) {
await this.email.setValue(email);
await this.password.setValue(password);
await this.signIn.click();
}
}
export default new LoginPage();Tests import the singleton and call domain methods.
Running tests (CLI)
| Command | Purpose |
npx wdio run wdio.conf.ts | Run with the named config. |
npx wdio run wdio.conf.ts --spec ./test/specs/login.spec.ts | One spec. |
npx wdio run wdio.conf.ts --suite smoke | Run a named suite (defined in config suites). |
npx wdio config | Run the interactive generator. |
npx wdio repl chrome | Interactive REPL against a live browser. |
Verify flags with npx wdio run --help against your installed version.
Reporters
spec— terminal-friendly, default.junit— for CI integration (JUnit XML).allure— rich HTML reports.dot— minimal.mochawesome— HTML+JSON (when using Mocha).
Multiple reporters can be configured simultaneously.
Common Pitfalls
- Forgetting
await— v8+ is async/await only. A missing await silently returns a Promise and the next command may run against a stale element. ESLint rules help. - Mixing sync (v7) and async (v8) patterns — pick one. If on v8+, all examples should be async.
- Brittle CSS class selectors — use
data-test/data-testidconsistently. - Setting
waitforTimeouttoo high to mask flake — the test passes once and hides the underlying race. Triage the race, then lower the timeout. - Putting assertions in page objects — keep them in tests.
- Running everything in one giant config — split with
wdio.web.conf.tsandwdio.mobile.conf.tswhen web and mobile diverge. - Not pinning service versions — services are independent packages and can change behavior between minor releases.
- Confusing
browser.waitUntilwithelement.waitFor*— element-specific waits are usually clearer; usewaitUntilfor arbitrary predicates only.
Task-Specific Questions
When helping with WebdriverIO, ask:
- WebdriverIO version — v7, v8, or v9?
- Web only, mobile only, or both?
- Test framework — Mocha, Jasmine, or Cucumber?
- Which services are in use (Appium, Selenium Standalone, Sauce, BrowserStack)?
- What's your parallelism budget —
maxInstanceslocally and matrix on CI? - Where do tests run — local, Selenium Grid, cloud provider, Appium farm?
- Reporter requirements — JUnit XML for CI, Allure for humans, or both?
Related Skills
- selenium — WDIO speaks W3C WebDriver; Selenium patterns and gotchas largely apply.
- appium — for native mobile capability details, locator strategies, and gesture APIs.
- cloud-test-grids — Sauce / BrowserStack / LambdaTest service configurations.
- selenium-grid — for self-hosted W3C-compatible Grid setups.
- ci-test-orchestration — for cross-machine sharding (WDIO
maxInstancesis in-process only). - flaky-test-management — when high waitforTimeout values are masking the real issue.
- playwright / cypress — for the trade-off conversation if the team is reconsidering tooling.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

