How to Migrate from Playwright to Vibium
How to migrate from Playwright to Vibium — map Playwright's API to Vibium's BiDi-native commands and gain a built-in MCP server and AI methods.
Migrating from Playwright to Vibium is mostly a renaming exercise, because Vibium was deliberately designed to Playwright-level developer experience — just on WebDriver BiDi instead of CDP. Both share the same browser → context → page object model, the same auto-waiting on actions, and the same screenshot and navigation patterns. Unlike the Selenium path, there is no drop-in compat shim — you rewrite scripts — but the method map is nearly one-to-one: goto becomes go, locator becomes find, textContent becomes text. The biggest ergonomic upgrade is that Playwright's eight separate getBy* finders collapse into a single find() that takes a CSS string or semantic keywords. In return you get a single Go binary that auto-downloads Chrome, a built-in MCP server for AI agents, and AI-native check() and do() methods. Vibium was created by Jason Huggins, co-creator of Selenium and Appium.
Why migrate from Playwright to Vibium?
The practical motivations are leaner packaging and first-class AI support. Vibium is a single Go binary that auto-downloads Chrome for Testing, removing Node and separate browser installs from the critical path. More importantly, it ships a built-in MCP server, so AI agents drive the browser without bolting on a separate Playwright MCP component.
Playwright remains outstanding for mature multi-language suites and its deep runner ecosystem. Migrate when you want a BiDi-first foundation and AI agents as a first-class use case.
How do I install Vibium?
Install the client and let Vibium manage the browser.
# Python
pip install vibium
# JavaScript / TypeScript
npm install vibiumSee the install guide for platform notes.
How does Playwright's API map to Vibium?
Most of the migration is mechanical renaming. The table below maps the commands you will touch most often.
| Playwright | Vibium |
|---|---|
page.goto(url) | vibe.go(url) |
page.locator("css") | vibe.find("css") |
page.getByRole("button") | vibe.find(role="button") |
page.getByText("Sign In") | vibe.find(text="Sign In") |
page.getByLabel("Email") | vibe.find(label="Email") |
locator.click() | el.click() |
locator.fill(v) / pressSequentially | el.type(v) |
locator.textContent() | el.text() |
locator.getAttribute(n) | el.get_attribute(n) |
page.screenshot() | vibe.screenshot() |
browser.close() | vibe.quit() |
The standout difference: Playwright needs getByRole("button").filter({ hasText: "Submit" }) to combine strategies, while Vibium does it in one call — vibe.find(role="button", text="Submit").
What does a converted script look like?
Here is a Playwright login flow and its Vibium equivalent. Vibium's sync API is the default for Python.
# Playwright
from playwright.sync_api import sync_playwright
with sync_playwright() as p:
page = p.chromium.launch().new_page()
page.goto("https://example.com/login")
page.get_by_label("Email").fill("admin@example.com")
page.get_by_label("Password").fill("secret")
page.get_by_role("button", name="Sign In").click()
page.screenshot(path="out.png")# Vibium
from vibium import browser_sync as browser
vibe = browser.launch()
vibe.go("https://example.com/login")
vibe.find(label="Email").type("admin@example.com")
vibe.find(label="Password").type("secret")
vibe.find(role="button", text="Sign In").click()
open("out.png", "wb").write(vibe.screenshot())
vibe.quit()Both auto-wait for elements to be actionable, so you rarely need explicit waits. See the automate-login guide for the full pattern.
What do I gain after migrating?
Beyond the renamed API, Vibium adds features that change how you write automation. The built-in MCP server lets AI agents call Vibium tools directly — set it up in Claude Code. And the AI-native methods let you describe intent instead of selectors:
vibe.do("add the first item to the cart")
result = vibe.check("the cart shows 1 item")
assert result.passedThese sit on top of the deterministic find()/click() API — they plan with AI but execute with Vibium's own commands, so behavior stays inspectable.
What should I watch out for?
A few differences to plan for during migration:
- No compat shim. Unlike Selenium, there is no import-swap bridge for Playwright — you translate scripts using the mapping above.
- Ecosystem maturity. Vibium is new (v1 December 2025), so its test runner, reporter, and plugin ecosystem are smaller than Playwright's. If you depend heavily on Playwright fixtures and reporters, weigh that.
- Language coverage. Vibium ships Python and JS/TS clients today; Playwright additionally offers Java and .NET.
The verdict
Because Vibium was built to Playwright-level DX on BiDi, migration is more renaming than rearchitecting — and the single find() method often makes the result cleaner than the original. The trade is a younger ecosystem in exchange for a leaner single-binary install and genuine AI-native capabilities. If your work is shifting toward agentic browsing, the move is well worth it; if you lean hard on Playwright's runner and reporters, migrate incrementally and keep both during the transition.
Next steps
Frequently asked questions
How do I migrate from Playwright to Vibium?
Vibium's API is deliberately close to Playwright's, so migration is mostly renaming methods: goto becomes go, locator becomes find, and Playwright's eight getBy methods collapse into one find() with semantic keywords. There is no compat shim, so you rewrite scripts, but the patterns map almost one-to-one.
Is Vibium's API similar to Playwright's?
Yes. Vibium was designed to Playwright-level developer experience on WebDriver BiDi. It shares the browser, context, and page object model, auto-waiting, and screenshots. The main differences are shorter names (go, find, text) and a single find() method that combines selector strategies Playwright splits across getByRole, getByText, and more.
Why move from Playwright to Vibium?
Vibium ships as a single Go binary that auto-downloads Chrome, speaks WebDriver BiDi, and includes a built-in MCP server so AI agents drive the browser with no separate component. It also adds AI-native check() and do() methods. It is leaner and more AI-focused than Playwright, though its ecosystem is newer.
Vibium is created by Jason Huggins. This is an independent tutorial — see the official Vibium site and GitHub repo for canonical docs.
Related guides
The Best AI Browser Automation Tools in 2026
The best AI browser automation tools in 2026 — Vibium, Playwright MCP, and more compared on MCP support, protocol, languages, and agentic use cases.
3 min read→ComparisonsThe Best Playwright Alternatives in 2026
The best Playwright alternatives in 2026 — Vibium, Selenium, Cypress, and Puppeteer compared on protocol, languages, AI/MCP support, and ideal use cases.
3 min read→ComparisonsThe Best Selenium Alternatives in 2026
The best Selenium alternatives in 2026 — Vibium, Playwright, Cypress, and Puppeteer compared on protocol, languages, AI/MCP support, and ideal use cases.
4 min read→ComparisonsIs Vibium Faster Than Playwright?
Is Vibium faster than Playwright? An honest look at startup, protocol, and runtime speed — where each tool wins and why benchmarks depend on your workload.
4 min read→