Exit course
Chapter 1 of 11 Intermediate 5 min read 1 quick check Updated

WebdriverIO Tutorial: Web Testing in TypeScript

A free WebdriverIO tutorial for web apps in TypeScript: project setup, selectors, auto-waiting, expect-webdriverio, page objects, cross-browser runs on TestingBot, parallel suites, CI and debugging.

The whole course as one 9:06 video, chapter by chapter, with captions. Prefer reading? Every chapter is below.

What you will learn

  1. WebdriverIO Tutorial: Web Testing in TypeScript
  2. Set Up a WebdriverIO Project in TypeScript
  3. WebdriverIO Selectors: CSS, Text, Role and $$
  4. Async/Await, Auto-Waiting and Explicit Waits
  5. Assertions with expect-webdriverio
  6. Page Objects in WebdriverIO
  7. Run WebdriverIO on TestingBot Across Browsers
  8. Parallel Runs, Suites and Running a Subset
  9. Reporters, Screenshots on Failure and CI
  10. Debugging WebdriverIO Tests
  11. Knowledge check
On this page
  1. What makes WebdriverIO different
  2. Which version this course uses
  3. How the course is organised
  4. What you'll build
  5. Prerequisites

Last reviewed November 2026 against WebdriverIO 10.2.0, expect-webdriverio 8.1.0, @wdio/testingbot-service 10.2.0 and Node.js 22.23.

WebdriverIO is an open-source test automation framework for Node.js. You write tests in JavaScript or TypeScript, and WebdriverIO drives real browsers through the W3C WebDriver protocol (and WebDriver BiDi where the browser supports it). The same project can run in your local Chrome, on a Selenium Grid, or on a cloud grid with dozens of browser and operating system combinations, without changing a line of test code.

This course teaches WebdriverIO for web applications: from npm init wdio in an empty folder to a TypeScript suite that runs on Chrome, Firefox and Safari in the cloud and in GitHub Actions. If you want to test native iOS and Android apps, take the Appium tutorial with WebdriverIO instead; it uses the same runner and the same $ and expect you will learn here, pointed at Appium.

What makes WebdriverIO different#

Three things explain most of how a WebdriverIO suite looks.

It is a test runner, not only a client library. Selenium's JavaScript bindings give you a driver object and leave the rest to you. WebdriverIO ships wdio, a runner that reads one config file (wdio.conf.ts), starts a worker process per spec file and browser, hands each worker a ready browser session, and collects the results through reporters. Services plug into that lifecycle: the TestingBot service you will add in chapter 6 names each cloud session and marks it passed or failed for you.

Every command is async and auto-waits. You await each command. Element commands such as click() and setValue() first wait (up to waitforTimeout, 10 seconds in the starter config) for the element to exist, and expect matchers retry until they pass or time out. Existing is not the same as ready: a disabled button exists too. Chapter 3 shows when the built-in waiting is enough and when you need an explicit waitForEnabled() or waitForClickable().

One element means one element. Since WebdriverIO 10, $ is strict: if a selector matches more than one element, it throws a StrictSelectorError instead of quietly using the first one. You will hit this in chapter 2 and again in chapter 4, on purpose.

Your team wants one framework for its web app and, later, its native Android app. Which statement about WebdriverIO is accurate?

For browsers WebdriverIO talks to the browser driver (or a grid); for native apps it talks to Appium. The runner, config, $ and expect stay the same, which is why the web and mobile courses share so much.

Which version this course uses#

Every sample was run with WebdriverIO 10.2.0, the current release in November 2026. Version 10 needs Node.js 22.23.4, 24.22.1, 26.12.1 or later in those lines; on an older Node.js, npm init wdio stops with an "Unsupported Node.js Version" message before it creates anything. If you are coming from WebdriverIO 7 or 8, three things changed that older tutorials still get wrong:

  • the config is an ES module (export const config = {...}), not exports.config,
  • the synchronous mode (browser.url() without await) is long gone, and
  • $ is strict, as described above.

How the course is organised#

Each chapter adds to one project, so you finish with a suite you understand line by line:

  1. Set up a TypeScript project with npm init wdio and run the first spec
  2. Selectors: CSS, text, accessible name, $$ and chaining
  3. async/await, auto-waiting and explicit waits
  4. Assertions with expect-webdriverio
  5. Page objects in WebdriverIO
  6. Running on TestingBot across several browsers, with a build name and pass/fail status
  7. Parallel runs, suites and running a subset of specs
  8. Reporters, screenshots on failure and GitHub Actions
  9. Debugging: browser.debug(), logs and the session video
  10. A knowledge check

The examples run against the-internet.herokuapp.com, a public practice site with a login form, dynamic loading, tables and checkboxes, so you can copy them and see them pass.

A note on certification: the course and its knowledge check are free and need no account. If you want something to show an employer, the optional TestingBot WebdriverIO certification asks for a passed exam and the course suite running green on TestingBot. It is issued by TestingBot, not by the WebdriverIO project or the OpenJS Foundation.

What you'll build#

A TypeScript WebdriverIO project that:

  • logs in, checks a secure page and logs out through page objects,
  • waits for content that appears seconds after a click without a single pause(),
  • asserts on titles, URLs, text, attributes and lists with retrying matchers,
  • runs on Chrome and Firefox on Windows 11 and Safari on macOS on TestingBot, one build per run, every session marked passed or failed,
  • writes JUnit XML and failure screenshots, and runs from GitHub Actions.

Prerequisites#

  • Node.js 22.23.4 or newer (check node -v) and npm.
  • Some JavaScript or TypeScript: functions, arrow functions, async/await. You do not need to know TypeScript's type system; the starter config handles it.
  • Google Chrome installed locally for chapters 1 to 5.
  • A TestingBot account for chapters 6 to 9 (the free trial is enough) and a GitHub account for the CI part of chapter 8.

If you are still choosing a tool, the Playwright tutorial and the Cypress tutorial follow a similar arc for those frameworks, and the cross-browser testing course explains which browser combinations are worth testing.