Appearance
Install
Prerequisites
- Node.js v18.20.0 or higher (active LTS release required)
- A browser installed locally (Chrome, Firefox, etc.)
Verify Node.js version:
bash
node --versionInteractive wizard (recommended)
The official way to start a new WebdriverIO project. Run the wizard in your project directory:
bash
npm init wdio@latest .Or to scaffold into a new subdirectory:
bash
npm init wdio@latest ./my-test-projectThe wizard prompts you to choose:
- Testing type (E2E or Component)
- Framework (Mocha, Jasmine, or Cucumber)
- Browser (Chrome, Firefox, Safari, Edge)
- Reporter (spec, dot, allure, etc.)
- Additional plugins
To skip all prompts and accept defaults:
bash
npm init wdio@latest . -- --yesManual install (add to an existing project)
If you already have a Node.js project and want to add WebdriverIO:
bash
npm install --save-dev @wdio/cliThen generate a config file:
bash
npx wdio configInstall the ChromeDriver service (common dependency)
Most E2E setups need a browser driver. The wizard installs this for you, but you can add it manually:
bash
npm install --save-dev @wdio/selenium-standalone-serviceOr use ChromeDriver directly:
bash
npm install --save-dev wdio-chromedriver-serviceNode version note
WebdriverIO v9 requires Node.js 18+. Using an older Node will result in errors during install or config generation. Use nvm or fnm to switch Node versions if needed.