lmwebtest

lmwebtest is a Playwright Chromium browser automation host and web integration testing tool for lmscript. It provides a concise Web and Report DSL, a full reflective Playwright lmcode host, and CLI commands for page health checks and screenshots.

Quick reference

lmscript install github:lmctl-ai/lmwebtest
npx playwright install chromium
lmwebtest --version
lmwebtest test http://127.0.0.1:3000 --status 200 --selector "#app"
lmwebtest screenshot http://127.0.0.1:3000 --out screenshots/page.png
Surface or command Invocation or context Summary
Web DSL host _lmcode_ cli="lmwebtest" (context web: Web, report: Report) Navigate, wait for selectors, click/fill/press, save rendered HTML, and record findings
Playwright host _lmcode_ cli="lmwebtest playwright" (context pw: Playwright) Drive the complete Playwright API including file uploads, downloads, dialogs, routing, and expect
lmwebtest test lmwebtest test <url> [--status 200] [--title TEXT] [--selector CSS] Verify HTTP status, console/page errors, failed requests, visible selectors, and broken images
lmwebtest screenshot lmwebtest screenshot <url> --out <file.png> [--no-js] Capture a full-page PNG screenshot of a live or local URL
lmwebtest init lmwebtest init <site-name> [--url <url>] Scaffold a per-site Playwright test directory under sites/<site-name>
lmwebtest run / batch lmwebtest run [site-id|file] | lmwebtest batch Execute Playwright test suites across one or all configured site directories
let test_dsl = _lmcode_ cli="lmwebtest" install="github:lmctl-ai/lmwebtest@latest";
let page = web.navigate("https://example.com");
page.wait_for("h1", 10000);
if (!page.has("h1")) {
  report.add("missing_heading", "h1", 1, "Expected main heading");
  report.fail_if_any();
}
page.save_html("rendered.html");
web.close();
end _lmcode_
let r = run_lmcode(test_dsl);
require(r.ok, "web check failed");

Documentation pages

Source repository and releases