Exporting to Playwright

Every flow can be exported as a standalone Playwright test, so you're never locked in. Use it for offline debugging, in-IDE editing, or running flows on your own infrastructure.

How to export

  1. Open the Flows tab for your app.
  2. Click the Export menu on a flow row (or use the bulk-select to export many at once).
  3. Choose Download as Playwright test. You get a .spec.ts file per flow.

What you get

The exported file is plain Playwright — no Qassandra runtime required. It contains:

  • The flow name as the test name.
  • One await page.goto(...) for the entry URL.
  • A sequence of page.locator(selector).click() / page.locator(selector).fill(value) calls — one per step, using the same CSS selectors the cloud runner uses.
  • An expect(...).toBeVisible() at the end for each assertion.
import { test, expect } from "@playwright/test";

test("Log in with valid credentials", async ({ page }) => {
  await page.goto("https://myapp.com/");

  await page.locator('a[href="/login"]').click();
  await page.locator('input[name="email"]').fill("user@example.com");
  await page.locator('input[name="password"]').fill("hunter2");
  await page.locator('button[type="submit"]').click();

  await expect(page.locator('text=Welcome back')).toBeVisible();
});

Running the export

From any project with Playwright installed:

npm install -D @playwright/test
npx playwright install chromium
npx playwright test login.spec.ts
i

Why export?

Most teams use the cloud runner for everything. Export is for the cases where you want to debug a single flow in your IDE, ship it as part of a smoke-test job in your existing CI, or hand a reproduction to an engineer.

What you give up

Exported tests are a snapshot. They don't get the things Qassandra does on top of Playwright:

  • AI recovery when a selector breaks.
  • AI-evaluated assertions (the export uses literal text matches).
  • Visual regression and baseline comparison.
  • Smart flow selection based on PR metadata.
  • The Browserbase replay viewer.

Treat the export as a fall-back, not a primary workflow — but it's yours whenever you need it.