Skip to main content

Webdriver.IO Integration - MCP Server

The WebdriverIO MCP Server lets MCP compatible clients (such as Claude, Cursor, and other AI assistants) drive WebdriverIO sessions through natural-language tools. It supports Digital.ai Testing as a cloud provider, so you can run both web (Selenium) and mobile (Appium) sessions on your Digital.ai Testing cloud — without writing a wdio.conf.js.

info

This page covers driving Digital.ai Testing through the MCP Server. To write WebdriverIO test scripts directly, see Webdriver.IO Integration - Appium and Webdriver.IO Integration - Selenium.

Prerequisites

Before configuring the MCP Server, make sure you have:

  • Access to the target Digital.ai cloud instance and a valid access key. To know more about how to get the access key, see Obtain Your Access Key.
  • Node.js installed on the machine that runs the MCP client
  • npx available on that machine
  • An MCP compatible client configured to use the WebdriverIO MCP Server

Configure the MCP Server

Add the WebdriverIO MCP Server to your MCP client configuration and pass the credentials in the env block:

VariableDescription
DIGITALAI_CLOUD_URLYour Digital.ai Testing cloud host, for example https://<cloud-ip>
DIGITALAI_ACCESS_KEYYour Digital.ai Testing access key

The following example shows a JSON configuration for the MCP client that adds the WebdriverIO MCP Server with the required environment variables:

{
"mcpServers": {
"wdio-mcp": {
"command": "npx",
"args": ["-y", "-p", "@wdio/mcp", "wdio-mcp"],
"env": {
"DIGITALAI_CLOUD_URL": "https://<cloud-ip>",
"DIGITALAI_ACCESS_KEY": "<AccessKey>"
}
}
}
}

Save the configuration, then restart or reconnect your MCP client to apply the changes. After the client reconnects, it loads the WebdriverIO MCP Server and enables the Digital.ai Testing provider for creating Selenium and Appium sessions.

Web Test (Selenium)

Start a browser session on the Digital.ai Testing cloud by calling the start_session tool with provider: "digitalai". The browser runs on the operating system you set with os (mapped to the digitalai:osName capability). Use a supported OS string.

start_session example

start_session({
provider: "digitalai",
platform: "browser",
browser: "chrome", // chrome | firefox | MicrosoftEdge | safari
os: "Windows 10", // e.g. "Windows 10", "Windows 11", "Mac OS Sequoia"
navigationUrl: "https://demo-bank.ct.digital.ai/"
})

The session is created on <DIGITALAI_CLOUD_URL>/wd/hub, and the report link is returned in the start_session output. You can then drive the session with the other MCP tools (for example navigate, get_elements, click_element) and end it with close_session.

Mobile Test (Appium)

For native app tests, reference the application with a cloud:<package-or-bundle> identifier and select a device with a deviceQuery.

The deviceQuery can be as broad or as specific as you need. To run on any available Android device, query on the operating system alone; add @version, @name, or other attributes to narrow the selection.

start_session example — any available Android device

start_session({
provider: "digitalai",
platform: "android", // android | ios
app: "cloud:com.experitest.ExperiBank/.LoginActivity",
deviceQuery: "@os='android'"
})

start_session example — a specific device

start_session({
provider: "digitalai",
platform: "android",
app: "cloud:com.experitest.ExperiBank/.LoginActivity",
deviceQuery: "@serialnumber='ABCDE123456'"
})
info

Ensure the capabilities set are according to the standard appium server execution requirements. The Appium server version is selected at the project level, so the MCP Server does not pin one.

Test Reports

Digital.ai Testing generates a report for every session and returns its link (digitalai:reportUrl) in the start_session output.

Report status is set with the seetest:client.setReportStatus command — Passed, Failed, or Skipped, with a message. The MCP Server calls it automatically on close_session, marking the session from its outcome, so your reports reflect pass/fail out of the box.

info

seetest:client.setReportStatus is the recommended way to control report status — reach for it first. It sets the status explicitly and works regardless of the WebDriver transport. To know more about this command, see Set Report Status.

WebdriverIO uses the BiDi protocol by default. Disabling BiDi (with the wdio:enforceWebDriverClassic capability) is only relevant if you rely on the cloud automatically detecting failures from WebDriver command errors — it is not required when you use setReportStatus, so it should not be your first step.

Manage Apps

Use the list_apps and upload_app tools to manage applications on your Digital.ai Testing cloud. Both authenticate with your access key over the Applications REST API. For more information, see Application Manager.

List the apps available in your project

list_apps({ provider: "digitalai" })

Upload a new .apk or .ipa

upload_app({ provider: "digitalai", path: "/path/to/app.apk" })

upload_app returns a cloud:<package-or-bundle> reference that you can pass as the app parameter in start_session.