This guide will help you set up the WebdriverIO Desktop & Mobile monorepo for development.
Before you begin, ensure you have the following installed:
-
Node.js: Version 24 LTS (contributor toolchain — end-user Node range is defined per-package via
engines)node --version # Should be v24.x -
pnpm: Version 12 (installation);
package.jsonpins the exact version -
Git: For version control
git --version
git clone https://github.com/webdriverio/desktop-mobile.git
cd desktop-mobilepnpm installThis will:
- Install all root-level dependencies
- Install dependencies for all packages
- Link workspace packages together
- Set up Git hooks with Husky
pnpm buildThis builds every package in packages/, in dependency order, and Turborepo caches the results. It doesn't build the fixture apps; see e2e-testing.md for those.
pnpm turbo run test --filter=./packages/*This runs every package's unit tests. Avoid the root pnpm test: it also runs the E2E and package tests, which need built apps.
# Build all packages
pnpm build
# Build a specific package
pnpm --filter @wdio/electron-service build
pnpm --filter @wdio/tauri-service build
# Clean and rebuild
pnpm clean
pnpm build# Run every package's tests
pnpm turbo run test --filter=./packages/*
# Run tests with coverage
pnpm test:coverage
# Run tests for specific package
pnpm --filter @wdio/electron-service test
# Run tests in watch mode
pnpm --filter @wdio/electron-service vitest# Lint all packages
pnpm lint
# Lint and auto-fix
pnpm lint:fix
# Format code
pnpm format
# Type check all packages
pnpm typecheck# Rebuild a package when its source changes
pnpm --filter @wdio/electron-service devSee package-structure.md for detailed guidelines.
Quick steps:
- Create package directory:
packages/my-package/ - Copy structure from
packages/electron-service/ - Update
package.jsonwith your package details - Implement your code in
src/ - Add tests in
test/ - Build:
pnpm --filter @wdio/my-package build(use thenamefrom package.json) - Test:
pnpm --filter @wdio/my-package test
# Add dependency to specific package
pnpm --filter @wdio/electron-service add some-package
# Add dev dependency
pnpm --filter @wdio/electron-service add -D some-dev-package
# Add workspace dependency
pnpm --filter @wdio/electron-service add @wdio/native-utils@workspace:*Common dependencies are managed through pnpm's catalog feature in pnpm-workspace.yaml.
To use a catalog dependency:
{
"devDependencies": {
"typescript": "catalog:default",
"vitest": "catalog:default"
}
}The project uses three catalogs to test against different versions of key dependencies:
| Catalog | Purpose |
|---|---|
default |
Stable production versions — the reliable baseline |
next |
Electron nightly and WebdriverIO's upcoming release — catches breakage before it ships |
minimum |
Lowest supported versions — ensures backward compatibility |
pnpm catalog:default # Switch all packages to stable versions
pnpm catalog:next # Switch all packages to upcoming versions
pnpm catalog:minimum # Switch all packages to lowest supported versions# Update catalogs and npm dependencies interactively, then run update:tauri and update:cargo
pnpm update:dependencies
# Sync the Tauri fixtures to the latest stable Tauri (npm + Cargo.toml) and run cargo update
pnpm update:tauri
# Preview catalog changes without applying them
pnpm catalog:update:dry
# Target a specific catalog
pnpm catalog:update --default
pnpm catalog:update --next
pnpm catalog:update --minimumThe update process shows available updates, lets you select which to apply, updates pnpm-workspace.yaml, then runs pnpm install. In the next catalog, it pins each package that has a fixed version to its upcoming release, the newer of its next and latest tags, or to the newest version before that one if the release is too new for pnpm's minimumReleaseAge. WebdriverIO's packages follow webdriverio, and wait if one of them hasn't published its version yet. Every update is ticked.
The services support two WebdriverIO majors at once: their webdriverio and @wdio/* peer ranges allow the current major and the previous one. The default catalog holds the current major, and minimum holds the previous one.
CI runs on the current major. The wdio-v9.yml workflow checks the previous one:
- It builds, type-checks and unit-tests the packages on
minimumnightly, and on PRs that touch them. - It runs the Linux package tests, with the fixtures' WebdriverIO packages from
minimum, weekly, when dispatched, on a PR with theci:wdio-v9label, and when a release label is added to a PR.
To run a package test on the previous major locally, pass --wdio-catalog=minimum, as in pnpm test:package:electron -- --wdio-catalog=minimum.
When a new WebdriverIO major ships:
- Move
defaultto the new major andminimumto the one before it, and move the services' peer ranges with them. Dropping the oldest major is a breaking change for the services. - Match the packages' Node
enginesto the newwebdriverio's. - Rename
wdio-v9.yml, its workflow name, itsv9job names and theci:wdio-v9label after the new previous major. - Drop the job-wide Xvfb (
.github/workflows/actions/start-xvfb) if the new previous major starts its own display, as v10 does. - Update the two checks on the
minimumcatalog intest/scripts/switch-catalog.spec.ts: the major it holds, and the WebdriverIO packages it may lack.
Turborepo caches task outputs to speed up subsequent runs.
The local cache is stored in .turbo/ and is automatically used.
# Clear Turborepo cache
pnpm clean:cache
# Force rebuild (bypass cache)
pnpm build --force# Clean all build artifacts and caches
pnpm clean
# Clean just the Turbo cache
pnpm clean:cache# Run the same checks as CI
pnpm lint
pnpm typecheck
pnpm turbo run test --filter=./packages/*
pnpm build# Update catalogs and npm dependencies interactively, then run update:tauri and update:cargo
pnpm update:dependencies
# Sync the Tauri fixtures to the latest stable Tauri (npm + Cargo.toml) and run cargo update
pnpm update:tauri
# cargo update next to every committed Cargo.lock
pnpm update:cargo
# Move GitHub Actions uses: pins to their newest tags
pnpm update:actions
# update:dependencies, then update:actions
pnpm update:all
# Bump @releasekit/release and its workflow pins together. Not part of update:all.
pnpm update:releasekitTry cleaning and reinstalling:
pnpm clean
pnpm install
pnpm buildRebuild the project:
pnpm build --forceMake sure packages are built:
pnpm build
pnpm turbo run test --filter=./packages/*Reinstall Husky:
pnpm prepareRecommended extensions:
- ESLint: Microsoft ESLint extension
- Biome: Biome formatter
- TypeScript and JavaScript Language Features: Built-in
Workspace settings (.vscode/settings.json):
{
"editor.formatOnSave": true,
"editor.defaultFormatter": "biomejs.biome",
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true,
"source.organizeImports": true
}
}For working with Tauri packages and plugins:
-
Install Rust (if not already installed):
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
-
Install Tauri CLI:
cargo install tauri-cli # or npm install -g @tauri-apps/cli -
Build Tauri Plugin:
cd packages/tauri-plugin cargo build -
Build Tauri Test Apps:
cd fixtures/e2e-apps/tauri pnpm tauri build
See the Tauri Plugin README for detailed setup instructions.
For working with Dioxus packages:
-
Install Rust (if not already installed):
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
-
Install Linux system dependencies (Linux only):
# Debian/Ubuntu sudo apt-get install -y libwebkit2gtk-4.1-dev libgtk-3-dev libxdo-dev # Fedora sudo dnf install -y webkit2gtk4.1-devel gtk3-devel libxdo-devel # Arch Linux sudo pacman -S webkit2gtk-4.1 gtk3 xdotool
-
Build the Dioxus Bridge Crate:
cd packages/dioxus-bridge cargo build -
Build the Dioxus Fixture App (for E2E tests):
cd fixtures/e2e-apps/dioxus cargo build
No Dioxus CLI (dx) is required for testing — the service builds and runs the app binary directly.
See the Dioxus App Setup and Quick Start for detailed setup instructions.
- Read package-structure.md for package conventions
- Read CONTRIBUTING.md for contribution guidelines
- Read AGENTS.md for AI assistant context and coding standards
- Explore the Electron service implementation in
packages/electron-service/ - Explore the Tauri service implementation in
packages/tauri-service/ - Explore the Dioxus service implementation in
packages/dioxus-service/ - See Tauri Plugin README for Tauri plugin setup
- See Dioxus App Setup for Dioxus app setup
AGENTS.md holds the repo's guidance for coding agents. Claude Code, Codex, Cursor and others read it. Claude Code also loads the skills in .claude/skills/, such as add-native-service.
- Issues: Report bugs or request features on GitHub Issues
- Discussions: Ask questions on GitHub Discussions
- WebdriverIO: See WebdriverIO documentation