---
title: Puppeteer and WebdriverIO | TestingBot
description: Run Puppeteer-driven tests with WebdriverIO on the TestingBot cloud.
  Use WebdriverIO's devtools automation protocol to control a remote Chrome browser
  via the Chrome DevTools Protocol.
source_url:
  html: https://testingbot.com/support/web-automate/puppeteer/webdriverio
  md: https://testingbot.com/support/web-automate/puppeteer/webdriverio.md
---

# Puppeteer & WebdriverIO

WebdriverIO is a popular Automation Test Framework for Node.js.   
 It has built-in support for both `WebDriver` and the `Chrome DevTools Protocol`.

To get started, please install WebdriverIO:

```bash
npm i @wdio/cli @wdio/local-runner
```

Next, create a simple test suite with the command below. Follow the steps to set up a test suite.

```bash
npx wdio config
```

This will generate some files that we can use to run a Puppeteer test with WebdriverIO on the TestingBot browser grid.

## Run your first test

Create a new spec file with the example code below:

```javascript
import { format } from 'util'
import { remote } from 'webdriverio'

(async () => {
    const browser = await remote({
        capabilities: {
            'wdio:devtoolsOptions': {
                browserWSEndpoint: format(
                    `wss://cloud.testingbot.com?key=%s&secret=%s&browserName=chrome&browserVersion=latest`,
                    process.env.TESTINGBOT_KEY,
                    process.env.TESTINGBOT_SECRET
                )
            }
        }
    })

    await browser.url('https://testingbot.com')

    const title = await browser.getTitle()
    console.log(title) // returns "Cross Browser Testing and Mobile App Testing | TestingBot"
    await browser.deleteSession()
})()
```

You can find more information about WebdriverIO's Puppeteer support in the [WebdriverIO documentation](https://webdriver.io/docs/automationProtocols#devtools-protocol).

## Specifying browser and version

To specify on which browser and version your WebdriverIO + Puppeteer test should run, you can include both a `browserName` and `browserVersion` in the `browserWSEndpoint` URL.

  ![OS selected](https://testingbot.com/assets/environments/svg/windows11-0e1b28bc0fdd5034d3e4d3dc8d346c500a8c6522facf4b45d0da56537c1f1c6d.svg) Windows 11 › ![Browser selected](https://testingbot.com/assets/environments/svg/chrome-c4081ff447d2d898d4afcb8f074a907c960e6f007716c1a1d119eee6803c4042.svg) Chrome 139 

Loading environments...

Please wait while we load the available browsers and platforms.

### Looking for more help?

Have questions or need more information? Reach out via email or Slack.

[Email us](https://testingbot.com/contact/new) [Join our Slack](https://join.slack.com/t/testingb0t/shared_invite/zt-3bcw9xch-jk19~6XPs_xBrsAgAedkCw)
