Skip to main content
skill CX Codex

webdriverio-skill — Claude Code skill: tests and installation

Generates WebdriverIO end-to-end tests in JavaScript or TypeScript for local runs and TestMu AI cloud.

MIT 265 installs ★ 393 updated 2026-10-13

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add LambdaTest/agent-skills --skill webdriverio-skill -a claude-code
Open on GitHub

What webdriverio-skill does

webdriverio-skill guides an agent through WebdriverIO test generation for local execution or TestMu AI cloud. Mocha is the default runner; a Jasmine mention selects Jasmine, while Cucumber or BDD selects Cucumber. It covers selectors, element chaining, Page Object Model, and wait conditions.

The skill includes setup and run commands such as npm init wdio@latest and npx wdio run wdio.conf.js, plus examples for a single spec or suite. Cloud configuration uses LT_USERNAME, LT_ACCESS_KEY, and the lambdatest service. Cloud execution depends on those credentials being available.

More patterns are organized in reference/cloud-integration.md, reference/advanced-patterns.md, and reference/playbook.md. These references cover configuration, network mocking, file operations, iFrame and Shadow DOM work, API tests, mobile runs, and CI/CD.

What it helps with

  • generate a WebdriverIO end-to-end test
  • build a login flow with Page Objects
  • choose selectors for page elements
  • wait for an element or condition
  • run tests locally or in the cloud

Example prompts for the agent

  • Generate a WebdriverIO login test using browser.url, $, and expect.
  • Set up TypeScript tests with the Cucumber runner and wdio.conf.js.
  • Create a TestMu AI cloud configuration using LT_USERNAME and LT_ACCESS_KEY.

How to install webdriverio-skill

1Skills CLI (Vercel)

npx skills add LambdaTest/agent-skills --skill webdriverio-skill -a claude-code

2Manually: put the files in place

~/.claude/skills/webdriverio-skill/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/webdriverio-skill/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about webdriverio-skill

How do I install webdriverio-skill in Claude Code?

Run npx skills add LambdaTest/agent-skills --skill webdriverio-skill -a claude-code, then check ~/.claude/skills/webdriverio-skill/SKILL.md.

What does webdriverio-skill do?

It generates WebdriverIO tests in JavaScript or TypeScript for local runs and TestMu AI cloud. It also guides selector use, Page Object Model structure, and wait handling.

What is required for a TestMu AI cloud run?

The configuration uses LT_USERNAME, LT_ACCESS_KEY, the lambdatest service, and the hub.lambdatest.com host.

Source text

SKILL.md · MIT
---
name: webdriverio-skill
description: >
  Generates WebdriverIO (WDIO) automation tests in JavaScript or TypeScript.
  Supports local and TestMu AI cloud. Use when user mentions "WebdriverIO",
  "WDIO", "wdio.conf", "browser.url", "$", "$$". Triggers on: "WebdriverIO",
  "WDIO", "wdio", "browser.$".
languages:
  - JavaScript
  - TypeScript
category: e2e-testing
license: MIT
metadata:
  author: TestMu AI
  version: "1.0"
---

# WebdriverIO Automation Skill

## Step 1 — Execution Target

Default local. If mentions "cloud", "TestMu", "LambdaTest" → cloud via WDIO LambdaTest service.

## Step 2 — Framework

| Signal | Runner |
|--------|--------|
| Default | Mocha |
| "Jasmine" | Jasmine |
| "Cucumber", "BDD" | Cucumber |

## Core Patterns

### Selectors

```javascript
// ✅ Preferred
await $('[data-testid="submit"]').click();
await $('aria/Submit').click();
await $('button=Submit').click(); // text-based

// Chaining
await $('form').$('input[name="email"]').setValue('[email protected]');

// Multiple elements
const items = await $$('.list-item');
```

### Basic Test (Mocha)

```javascript
describe('Login', () => {
    it('should login successfully', async () => {
        await browser.url('/login');
        await $('[data-testid="email"]').setValue('[email protected]');
        await $('[data-testid="password"]').setValue('password123');
        await $('[data-testid="submit"]').click();
        await expect(browser).toHaveUrl(expect.stringContaining('/dashboard'));
    });
});
```

### Page Object

```javascript
class LoginPage {
    get inputEmail() { return $('[data-testid="email"]'); }
    get inputPassword() { return $('[data-testid="password"]'); }
    get btnSubmit() { return $('[data-testid="submit"]'); }

    async login(email, password) {
        await this.inputEmail.setValue(email);
        await this.inputPassword.setValue(password);
        await this.btnSubmit.click();
    }
}
module.exports = new LoginPage();
```

### TestMu AI Cloud Config

```javascript
// wdio.conf.js
exports.config = {
    user: process.env.LT_USERNAME,
    key: process.env.LT_ACCESS_KEY,
    hostname: 'hub.lambdatest.com',
    port: 80,
    path: '/wd/hub',
    services: ['lambdatest'],
    capabilities: [{
        browserName: 'Chrome',
        browserVersion: 'latest',
        'LT:Options': {
            platform: 'Windows 11',
            build: 'WDIO Build',
            name: 'WDIO Test',
            video: true,
            network: true,
        }
    }],
};
```

### Wait Strategies

```javascript
// Wait for element
await $('[data-testid="result"]').waitForDisplayed({ timeout: 10000 });

// Wait for condition
await browser.waitUntil(
    async () => (await $('[data-testid="count"]').getText()) === '5',
    { timeout: 10000, timeoutMsg: 'Count did not reach 5' }
);
```

## Quick Reference

| Task | Command |
|------|---------|
| Setup | `npm init wdio@latest` |
| Run all | `npx wdio run wdio.conf.js` |
| Run specific | `npx wdio run wdio.conf.js --spec ./test/login.js` |
| Run suite | `npx wdio run wdio.conf.js --suite smoke` |
| Parallel | Set `maxInstances: 5` in config |
| Screenshot | `await browser.saveScreenshot('./screenshot.png')` |

## Reference Files

| File | When to Read |
|------|-------------|
| `reference/cloud-integration.md` | LambdaTest service, parallel, capabilities |
| `reference/advanced-patterns.md` | Custom commands, reporters, services |

## Deep Patterns → `reference/playbook.md`

| § | Section | Lines |
|---|---------|-------|
| 1 | Production Configuration | Multi-env, multi-browser configs |
| 2 | Page Object Model | BasePage, LoginPage, DashboardPage |
| 3 | Custom Commands | Browser + element commands, TypeScript |
| 4 | Network Mocking | DevTools mock, abort, error simulation |
| 5 | File Operations | Upload, download, drag & drop |
| 6 | Multi-Tab, iFrame & Shadow DOM | Window handles, nested shadow |
| 7 | Visual Regression | Image comparison service |
| 8 | API Testing | Fetch-based, API+UI combined |
| 9 | Mobile Testing | Appium service integration |
| 10 | LambdaTest Integration | Cloud grid config |
| 11 | CI/CD Integration | GitHub Actions, Docker Compose |
| 12 | Debugging Quick-Reference | 11 common problems |
| 13 | Best Practices Checklist | 14 items |

© TestMu AI · MIT · LambdaTest/agent-skills

Similar skills

All skills for Testing and QA →

From the same set47

The whole set →
cicd-pipeline-skill cicd-pipeline-skill generates CI/CD configs for test automation: GitHub Actions, Jenkins, GitLab CI, Azure DevOps. Includes TestMu AI cloud integration. CX Codex +1 290installs junit-5-skill Generates production-grade JUnit 5 unit tests for Java with assertions, parameterized tests, Mockito mocks, and nested test groups. Use it to quickly cover your Java code with tests. CX Codex +1 289installs phpunit-skill This skill generates PHPUnit tests for PHP code, including assertions, data providers, mocks, and test doubles. Use it when you need tests shaped around a class or service. CX Codex +1 287installs cucumber-skill Creates Gherkin feature files and matching step definitions. Use it to turn application behavior into Cucumber BDD scenarios. CX Codex +1 283installs cypress-skill Generates production-grade E2E and component tests in JavaScript or TypeScript. Runs tests locally or on TestMu AI cloud, understands Cypress commands, and writes tests with proper selectors and network interception. CX Codex +1 264installs robot-framework-skill robot-framework-skill turns a described scenario into a .robot test in keyword-driven syntax, with SeleniumLibrary for browser flows and RequestsLibrary for API checks. CX Codex +1 253installs detox-skill Generates Detox E2E tests for React Native projects in JavaScript and TypeScript. Sets up tests for local emulators and TestMu AI cloud runs. CX Codex +1 252installs hyperexecute-skill This skill prepares and runs HyperExecute test jobs, checks YAML locally, connects CI, and helps investigate failed cloud runs. CX Codex +1 250installs

Project sponsors

Companies that keep this analytics open