Playwright
Connect a vanilla @playwright/test install to TestKase — the recommended wrapper CLI, the direct WebSocket endpoint, and supported Playwright versions.
Playwright
Run your Playwright suite against real browsers on macOS by connecting to the TestKase WebSocket endpoint. There are two ways to integrate, mirroring the SDK vs Direct split you may know from other vendors.
Two ways to connect
Recommended — the @testkase/playwright-reporter wrapper CLI
A drop-in for any existing Playwright project. Your test files and playwright.config.ts stay 100% native Playwright — no TestKase imports in your code.
- Install the reporter:
npm install --save-dev @testkase/playwright-reporter - Add a
testkase.ymlat your project root with credentials and capability flags:user: you@example.com accessKey: xyz_your_access_key browserName: Chrome recording: true console: true network: true driver: true - Run via the wrapper instead of
npx playwright test:npx testkase-playwright test
With the wrapper, every capture kind lights up — recording, driver logs, browser console, network HAR, test names and pass/fail status, step labels, and per-test recording slicing — identically across Chrome, Edge, and Firefox.
Direct — the raw WebSocket endpoint
For locked-down CI or custom runners that can't run a wrapper, connect a vanilla @playwright/test install straight to the endpoint, with credentials and capability flags JSON-encoded in the query string:
wss://hub.testkase.com/playwright?capabilities=<url-encoded JSON>import { chromium } from "@playwright/test";
const caps = encodeURIComponent(JSON.stringify({
browserName: "Chrome",
browserVersion: "latest",
"testkase:options": {
username: "you@company.com",
accessKey: process.env.TESTKASE_ACCESS_KEY,
build: "smoke-1",
name: "checkout flow",
},
}));
const browser = await chromium.connect(`wss://hub.testkase.com/playwright?capabilities=${caps}`);
const page = await (await browser.newContext()).newPage();
await page.goto("https://example.com");
await browser.close();Use the browser type that matches your target: chromium.connect() for Chrome/Edge, firefox.connect() for Firefox, webkit.connect() for WebKit/Safari. Playwright uses different wire protocols per browser type — a chromium client will not talk to a Firefox server.
Feature coverage at a glance
| Path | Chrome / Edge | Firefox |
|---|---|---|
Wrapper CLI (@testkase/playwright-reporter) | All features | All features |
| Direct WebSocket | All except test name/status, step labels, and per-test recording | Recording, driver, commands, and live view |
On the Direct path you can still populate test names/status yourself by emitting testkase_action: magic strings from page.evaluate — the same pattern other vendors document.
Supported Playwright versions
TestKase keeps 5 Playwright versions installed concurrently. The Hub auto-detects your client version from the WebSocket handshake (or from testkase:options.playwrightVersion) and routes you to the matching in-VM library.
| Playwright | Bundled Firefox | Bundled WebKit |
|---|---|---|
| 1.60 (newest) | 150 | 26.4 |
| 1.58 | 146 | 26.0 |
| 1.56 | 142 | 26.0 |
| 1.55 | 141 | 26.0 |
| 1.50 (floor) | 134 | 18.2 |
In-between clients (for example 1.57) resolve to the closest newer installed server (1.58). Clients below 1.50 or above 1.60 get a clear, actionable too-old / too-new error.
Firefox and WebKit are tied to your Playwright version — each Playwright release bundles exactly one Firefox and one WebKit build, so browserVersion: "latest" for those brands resolves to your client's bundled version, not the fleet's newest. A PW 1.50 client asking for "latest Firefox" gets Firefox 134, not 150. Chrome and Edge are independent — any Playwright version can drive any installed Chrome/Edge major. See Browsers.
Firefox naming
Playwright ships a patched Firefox and exposes it as a separate brand, pw-firefox. You can simply write browserName: "Firefox" and the Hub aliases it transparently on the /playwright endpoint.
