Skip to main content

Vibium Testing

Vibium is an open-source browser automation tool built for AI (coding) agents. It comes with a CLI and an MCP server, so both you and your AI agent can drive a real browser: navigate to pages, take screenshots, extract text and verify that generated code actually works.

Vibium connects to TestingBot through the regular WebDriver endpoint at hub.testingbot.com/wd/hub. Vibium creates the session with webSocketUrl: true and attaches to the WebDriver BiDi socket that the TestingBot grid returns, so no extra configuration is required.

Installation

Install the Vibium CLI globally with npm:

npm install -g vibium

Alternatively, you can run Vibium without installing it, via npx -y vibium.

Connect to TestingBot

Point vibium start to the TestingBot hub. Your TestingBot key and secret (obtained from the member dashboard) go in the username and password slots of the URL:

export TESTINGBOT_KEY="your_key"
export TESTINGBOT_SECRET="your_secret"

# Optional: capabilities for the session, "name" labels it in the TestingBot dashboard
export VIBIUM_CONNECT_CAPS='{"browserName":"chrome","tb:options":{"name":"vibium"}}'

vibium start "https://$TESTINGBOT_KEY:$TESTINGBOT_SECRET@hub.testingbot.com/wd/hub"

Once the session is started, every Vibium command runs against the cloud browser:

# Navigate and read the page
vibium go https://duckduckgo.com
vibium title

# Find elements by their semantic attributes; this returns a stable reference such as @e1
vibium find placeholder "Search privately"

# Fill the input and submit
vibium fill @e1 "TestingBot"
vibium press Enter

# Wait for the results, then capture them
vibium wait text "TestingBot"
vibium screenshot -o results.png
vibium text > results.txt

The test, together with a video recording and logs, will appear in the TestingBot dashboard while it runs.

MCP Server

Vibium also ships an MCP server, which allows AI agents such as Claude Code to control the browser through MCP tools. It reads the same connection settings from the environment; with VIBIUM_CONNECT_CAPS still exported from above:

VIBIUM_CONNECT_URL="https://$TESTINGBOT_KEY:$TESTINGBOT_SECRET@hub.testingbot.com/wd/hub" vibium mcp

Your AI agent will now open its browser sessions on TestingBot instead of on your local machine.

Client Libraries

Next to the CLI, Vibium provides client libraries for JavaScript/TypeScript, Python and Java. Pass the TestingBot hub URL when starting the browser session, or export VIBIUM_CONNECT_URL in your environment. The VIBIUM_CONNECT_CAPS environment variable from above works for the client libraries as well.

npm install vibium
import { writeFileSync } from 'node:fs'
import { browser } from 'vibium'

const hub = `https://${process.env.TESTINGBOT_KEY}:${process.env.TESTINGBOT_SECRET}@hub.testingbot.com/wd/hub`

const browserSession = await browser.start(hub)
const vibe = await browserSession.page()

await vibe.go('https://testingbot.com')
console.log(await vibe.title())
writeFileSync('example.png', await vibe.screenshot())

await browserSession.stop()
pip install vibium
import os
from vibium import browser

hub = f"https://{os.environ['TESTINGBOT_KEY']}:{os.environ['TESTINGBOT_SECRET']}@hub.testingbot.com/wd/hub"

browser_session = browser.start(hub)
vibe = browser_session.page()

vibe.go("https://testingbot.com")
print(vibe.title())

browser_session.stop()

The Java client picks up the connection from the VIBIUM_CONNECT_URL environment variable:

export VIBIUM_CONNECT_URL="https://$TESTINGBOT_KEY:$TESTINGBOT_SECRET@hub.testingbot.com/wd/hub"
var browserSession = Vibium.start();
var vibe = browserSession.page();

vibe.go("https://testingbot.com");
System.out.println(vibe.title());

var png = vibe.screenshot();
java.nio.file.Files.write(java.nio.file.Path.of("example.png"), png);

browserSession.stop();

Specify Browsers & Devices

The VIBIUM_CONNECT_CAPS environment variable holds the WebDriver capabilities for the session. Use it to pick a browser, browser version and operating system, and to set TestingBot specific options in tb:options.

To see how to do this, please select a combination of browser, version and platform in the drop-down menus below.

See the Test Configuration Options page for all the options that tb:options supports, such as video recording, timeouts and geolocation.

Stop the Session

When you are done, stop Vibium to delete the WebDriver session. This immediately releases your parallel test slot:

vibium stop

Testing Internal Websites

The browsers in the TestingBot cloud can only reach public URLs. To test a website on localhost or inside a private network, use the TestingBot Tunnel, which creates a secure connection between your machine and the TestingBot browser grid.

Was this page helpful?
Last updated