On this page
Moving to xtest from Selenium
xtest does not run Selenium WebDriver. There is no grid to point a driver at, no adapter to install and no remote URL: the browser automation underneath is Playwright, and the tests are driven by a test agent. Your existing WebDriver suite will not run here as it stands. What moves across is the flows it covers.
Bring the flow, not the driver code
Take one Selenium test and read what it proves, not how. Type that sentence into the Test Lab and watch the test agent do it on the Cloud browser, or hit record and click the flow through yourself. The test agent's run is kept with its steps, and its screenshots for 30 days; from then on those steps replay at no AI cost unless a step needs the AI; a recording lands in the editor as the Playwright file below.
What each habit turns into
driver.findElement(By.css(…))
You name the thing in words ("the Sign in button"). The test agent looks at the page and finds it; the recorder writes a role-based Playwright locator.
WebDriverWait, ExpectedConditions
Nothing to configure. The test agent reads the page before each action, so it waits because the button is not there yet, not because a number said so.
driver.getScreenshotAs(…)
The screenshots a test agent takes are kept with its run for 30 days, with no call to make.
A grid, and a driver matched to a browser version
The Cloud browser, or through the xtest app Chrome on your own Mac or PC, an iPhone simulator on a Mac, or an Android emulator on a Mac or an x64 PC.
Page objects maintained by hand
Saved steps. The first AI run stores what worked, later runs replay it for no AI cost unless a step needs the AI, and the AI repairs only the step that broke.
What the recorder hands back
A Playwright file in TypeScript. A recorded password comes out as an environment variable, so the test is safe to commit.
import { test, expect } from '@playwright/test';
// Credentials are read from the environment, never stored in this file.
// Set each TEST_ variable it reads wherever it runs, such as your CI secrets.
test("Recorded flow - your-site.example", async ({ page }) => {
await page.goto("https://your-site.example/login");
await page.getByLabel('Email').fill(process.env.TEST_USERNAME || '');
await page.getByLabel('Password').fill(process.env.TEST_PASSWORD || '');
await page.getByRole('button', { name: 'Sign in' }).click();
// Recorded flows assert nothing on their own. Add an expect for what this
// flow should leave on the page, so the test fails when the flow breaks.
await expect(page).toHaveURL(/.+/);
});What you give up
The Java, Python, C# and Ruby bindings, and any test that depends on WebDriver behaviour directly. Firefox and Safari are not drivable here either: the Cloud browser is Chromium, and on your own Mac it is Chrome. If those matter more than the rest of this, keep your grid.
[Academy courses]