---
title: Run WebdriverIO on TestingBot Across Browsers | TestingBot
description: So far every spec has run in the Chrome on your machine. Your users also
  use Firefox, Safari and Edge, on Windows and macOS, and you probably do not have
  all…
source_url:
  html: https://testingbot.com/resources/courses/webdriverio/run-on-testingbot
  md: https://testingbot.com/resources/courses/webdriverio/run-on-testingbot.md
---

Course

[WebdriverIO Tutorial for Web Testing](https://testingbot.com/resources/courses/webdriverio)

Chapter 7 of 11

1. [1 WebdriverIO Tutorial: Web Testing in TypeScript](https://testingbot.com/resources/courses/webdriverio)
2. [2 Set Up a WebdriverIO Project in TypeScript](https://testingbot.com/resources/courses/webdriverio/project-setup)
3. [3 WebdriverIO Selectors: CSS, Text, Role and $$](https://testingbot.com/resources/courses/webdriverio/selectors)
4. [4 Async/Await, Auto-Waiting and Explicit Waits](https://testingbot.com/resources/courses/webdriverio/waiting)
5. [5 Assertions with expect-webdriverio](https://testingbot.com/resources/courses/webdriverio/assertions)
6. [6 Page Objects in WebdriverIO](https://testingbot.com/resources/courses/webdriverio/page-objects)
7. [7 Run WebdriverIO on TestingBot Across Browsers](https://testingbot.com/resources/courses/webdriverio/run-on-testingbot)
8. [8 Parallel Runs, Suites and Running a Subset](https://testingbot.com/resources/courses/webdriverio/parallel-and-suites)
9. [9 Reporters, Screenshots on Failure and CI](https://testingbot.com/resources/courses/webdriverio/reporters-and-ci)
10. [10 Debugging WebdriverIO Tests](https://testingbot.com/resources/courses/webdriverio/debugging)
11. [11 Knowledge check](https://testingbot.com/resources/courses/webdriverio/knowledge-check)

[Exit course](https://testingbot.com/resources/courses)

 Chapter 7 of 11 Intermediate 8 min read 3 quick checks Updated Nov 2026 

# Run WebdriverIO on TestingBot Across Browsers
[Watch this chapter Starts at 4:19 in the 9:06 course video.](https://www.youtube.com/watch?v=kgScgamfIDc&t=259s)On this page
1. [Install the TestingBot service](https://testingbot.com#install-the-testingbot-service)
2. [A separate cloud config](https://testingbot.com#a-separate-cloud-config)
3. [Run it](https://testingbot.com#run-it)
4. [What the first cloud run found](https://testingbot.com#what-the-first-cloud-run-found)
5. [Testing a site on localhost or a private network](https://testingbot.com#testing-a-site-on-localhost-or-a-private-network)

So far every spec has run in the Chrome on your machine. Your users also use Firefox, Safari and Edge, on Windows and macOS, and you probably do not have all of those installed. Because WebdriverIO speaks the standard WebDriver protocol, moving to a cloud grid is a configuration change: point the runner at the grid, add credentials, list the browsers you want. The specs and page objects stay exactly as they are.

This chapter adds a second config file that runs the four spec files on Chrome and Firefox on Windows 11 and Safari on macOS Sequoia on TestingBot, groups each run into a build, and marks every session passed or failed.

## Install the TestingBot service[#](https://testingbot.com#install-the-testingbot-service)

```bash
npm install --save-dev @wdio/testingbot-service
```

`@wdio/testingbot-service` is maintained in the WebdriverIO repository and released with it; version 10.2.0 (November 2026) matches the WebdriverIO 10.2.0 used in this course. It hooks into the runner's lifecycle and does three things:

- before each test, it sends the test's name to the session, so the TestingBot dashboard shows which test was running at each point of the video;
- after each spec file, it calls the TestingBot API to set the session's **name** (the `describe` title) and its **passed or failed** state, from the results the runner collected;
- if you set `tbTunnel: true`, it starts TestingBot Tunnel before the run and stops it afterwards (see the end of this chapter).

Without the service the tests still run, but every session in the dashboard shows an unknown state, because the grid cannot know whether your assertions passed.

Export your key and secret from the TestingBot account page as environment variables, so they never end up in the repository:

```bash
export TESTINGBOT_KEY=your-key
export TESTINGBOT_SECRET=your-secret
```

## A separate cloud config[#](https://testingbot.com#a-separate-cloud-config)

Keep `wdio.conf.ts` for local runs and create `wdio.testingbot.conf.ts` next to it. It imports the local config and overrides what changes:

```typescript
import { config as baseConfig } from './wdio.conf.js'

const build = process.env.TB_BUILD ?? `local-${new Date().toISOString().slice(0, 16)}`

export const config: WebdriverIO.Config = {
    ...baseConfig,

    user: process.env.TESTINGBOT_KEY,
    key: process.env.TESTINGBOT_SECRET,
    hostname: 'hub.testingbot.com',
    protocol: 'https',
    port: 443,
    path: '/wd/hub',

    services: [['testingbot', {}]],

    maxInstances: Number(process.env.TB_PARALLEL ?? 2),
    capabilities: [
        {
            browserName: 'chrome',
            browserVersion: 'latest',
            platformName: 'WIN11',
            'goog:chromeOptions': {
                prefs: {
                    credentials_enable_service: false,
                    'profile.password_manager_enabled': false,
                    'profile.password_manager_leak_detection': false
                }
            },
            'tb:options': { build }
        },
        {
            browserName: 'firefox',
            browserVersion: 'latest',
            platformName: 'WIN11',
            'tb:options': { build }
        },
        {
            browserName: 'safari',
            browserVersion: 'latest',
            platformName: 'SEQUOIA',
            'tb:options': { build }
        }
    ]
}
```

What each part does:

- **`user` and `key`** authenticate you. **`hostname`, `protocol`, `port` and `path`** send WebDriver traffic to TestingBot's hub instead of a local driver. (WebdriverIO can guess the TestingBot hub from the length of the key, but spelling it out makes the config readable and does not depend on that guess.)
- **`capabilities`** lists one entry per browser configuration. `browserName`, `browserVersion` and `platformName` are the W3C capabilities; `latest`, `latest-1` and so on pick a version relative to the newest one. The [WebdriverIO documentation page](https://testingbot.com/support/web-automate/selenium/nodejs/webdriverio) has a capabilities picker for every browser, version and operating system TestingBot offers.
- **`tb:options`** holds TestingBot-specific settings. **`build`** groups every session of this run under one build in the dashboard. Here it comes from the `TB_BUILD` environment variable, or a timestamp for runs from your laptop; chapter 8 sets it to the CI run id. The [capabilities builder](https://testingbot.com/support/web-automate/selenium/capabilities) generates the other options, such as screen resolution, time zone and whether to record a video.
- **`goog:chromeOptions.prefs`** switches off Chrome's password manager. That is not a TestingBot setting; it fixes a real failure described below.
- **`maxInstances`** is how many sessions run at once. Chapter 7 is about choosing it.

The service needs no options for this. Leave the session `name` out of `tb:options` as well: the service overwrites it with the `describe` title at the end of each spec file.

Add a script to `package.json`:

```json
"wdio:tb": "wdio run ./wdio.testingbot.conf.ts"
```

Every session of your cloud run shows up in the TestingBot dashboard with an unknown result, even though the terminal says all specs passed. What is missing?

 A `build` in `tb:options` `browserVersion: 'latest'` A higher `maxInstances` The TestingBot service in `services`, which reports each spec file's result to the TestingBot API

The grid only sees WebDriver commands; whether an assertion passed is known to your runner. The service sends that result after each spec file. A build name groups sessions but does not set their state.

## Run it[#](https://testingbot.com#run-it)

```bash
TB_PARALLEL=1 npm run wdio:tb
```

WebdriverIO starts one worker per spec file and capability, twelve in all (four spec files times three browsers), and each worker becomes one TestingBot session. The spec reporter prints a block per worker:

```
[Safari 18.6 macOS #2-1] Running: Safari (v18.6) on macOS
[Safari 18.6 macOS #2-1] Session ID: c8ec9081f1e8-44d37b678a8c-178419b39429-179455674534-76445883
[Safari 18.6 macOS #2-1]
[Safari 18.6 macOS #2-1] » test/specs/login.e2e.ts
[Safari 18.6 macOS #2-1] Login
[Safari 18.6 macOS #2-1] ✓ logs in with valid credentials and out again
[Safari 18.6 macOS #2-1] ✓ shows an error for a wrong password
[Safari 18.6 macOS #2-1]
[Safari 18.6 macOS #2-1] 2 passing (9.7s)
```

The session id in the output is the TestingBot session id, so you can paste it into the dashboard search. In the dashboard, the build contains twelve sessions named Login, Selectors, Waiting and Assertions, each with its browser, a passed or failed state, a video and the WebDriver command log.

## What the first cloud run found[#](https://testingbot.com#what-the-first-cloud-run-found)

The specs passed locally in Chrome. On the grid, the first run of this course's suite had four failed sessions out of twelve, and each one taught something:

**Chrome's password manager covered the page.** The Login spec failed on Chrome on Windows with `Expected: "You logged out of the secure area!"` but `Received: "You logged into a secure area!"`. The session video showed why: after the login, Chrome opened a "Change your password" dialog, because the practice site's well-known demo password appears in breach lists. The dialog sat over the page and swallowed the Logout click. Local Chrome had not shown it. The `goog:chromeOptions.prefs` block above turns the password manager and its leak check off, and the Login spec passed on the next run.

**`aria/Password` matched the label in Firefox** , and silently found the wrong element in Safari. Chapter 2 tells that story; the fix was a role selector and an id.

**A checkbox test failed in Chrome and Safari** too. It runs in the same session right after the login test of the Selectors spec, and both failures went away once the login problems above were fixed. Tests in one spec file share a browser session (chapter 7), so a failure early in a file can leave the browser in a state that breaks the next test. Fix the first failure in a file before you investigate the ones after it.

None of these show up when you only run Chrome on your own machine. That is the case for running the suite on several browsers before you trust it, and for always looking at the video before changing a test (chapter 9).

A spec passes in local Chrome but fails on Chrome on the grid: a click on "Logout" has no effect. What do you do first?

 Add `browser.pause(2000)` before the click Open the failed session's video in the dashboard and look at what was on screen at the moment of the click Switch the selector to XPath

A click "with no effect" usually means something else received it: a dialog, a cookie banner, an overlay. The video shows it in seconds. A pause or a different selector is a guess that may hide the cause.

## Testing a site on localhost or a private network[#](https://testingbot.com#testing-a-site-on-localhost-or-a-private-network)

The browsers on the grid cannot reach `http://localhost:3000` on your laptop or a staging server behind a firewall. The TestingBot service can start a tunnel for the run:

```typescript
services: [['testingbot', { tbTunnel: true }]]
```

The service downloads and starts TestingBot Tunnel before the first session, tags every capability so its traffic goes through that tunnel, and closes it when the run completes. Set `baseUrl` to your local address and the specs work unchanged. The [local website testing course](https://testingbot.com/resources/courses/local-website-testing) explains how the tunnel works and how to debug it, and the [tunnel documentation](https://testingbot.com/support/tunnel) lists its options, which you can pass as `tbTunnelOpts`.

You set `baseUrl: 'http://localhost:4200'` and run on TestingBot. Every test fails at `browser.url()` with a connection error. What fixes it?

 Use `http://127.0.0.1:4200` instead Raise `connectionRetryTimeout` Enable `tbTunnel: true` in the TestingBot service options

On the grid, `localhost` is the remote virtual machine, not your laptop, and 127.0.0.1 is the same thing. The tunnel gives the remote browser a route to your machine.

If you want to drive the same grid from the Puppeteer API through WebdriverIO, or run accessibility checks in these sessions, see the [WebdriverIO with Puppeteer](https://testingbot.com/support/web-automate/puppeteer/webdriverio) and [accessibility testing with WebdriverIO](https://testingbot.com/support/accessibility/web/webdriverio) documentation.

[Previous · Chapter 6 Page Objects in WebdriverIO](https://testingbot.com/resources/courses/webdriverio/page-objects) [Next · Chapter 8 Parallel Runs, Suites and Running a Subset](https://testingbot.com/resources/courses/webdriverio/parallel-and-suites)

On this page

1. [Install the TestingBot service](https://testingbot.com#install-the-testingbot-service)
2. [A separate cloud config](https://testingbot.com#a-separate-cloud-config)
3. [Run it](https://testingbot.com#run-it)
4. [What the first cloud run found](https://testingbot.com#what-the-first-cloud-run-found)
5. [Testing a site on localhost or a private network](https://testingbot.com#testing-a-site-on-localhost-or-a-private-network)

Certification

Earn the free, resume-worthy TestingBot WebdriverIO Certification for this course.

[How it works](https://testingbot.com/resources/courses/webdriverio/certification)
