@testmuai/playwright-bindings
v0.1.7
Published
Testmu binding for Playwright — thin runtime for LambdaTest exports
Downloads
5,072
Maintainers
Readme
@testmuai/playwright-bindings
Thin runtime for testmu-style Playwright tests in TypeScript/JavaScript. Companion to testmuai-playwright-bindings (Python).
Install
npm install @testmuai/playwright-bindings playwrightUsage
import testmu, { resolveVar, setVar } from "@testmuai/playwright-bindings";
import { expect } from "@playwright/test";
testmu.configure({
build: "build-123",
name: "Login Test",
variables: { email: "[email protected]" },
testParams: { BASE_URL: "https://example.com" },
});
testmu.test("Login flow", async (page) => {
testmu.step("Navigate");
await page.goto(await resolveVar("${BASE_URL}"));
testmu.done();
testmu.step("Fill credentials");
await page.locator("#email").fill(await resolveVar("{{email}}"));
testmu.done();
});
testmu.run();Env vars
| Var | Purpose |
| ------------------------------ | ---------------------------------------------------------------- |
| TESTMU_RUN_TARGET | local (default) or cloud |
| LT_USERNAME, LT_ACCESS_KEY | LambdaTest credentials (enables ATMS + vision) |
| TESTMU_SMART | 1 enables vision/heal (validated at run() — requires LT creds) |
Build
npm run build # tsc → dist/
npm test # vitest run
npm run typecheck # tsc --noEmit