← snapshot
707 bytes
import { chromium } from "@playwright/test";
const b = await chromium.launch();
const p = await b.newPage({ viewport: { width: 1400, height: 900 }, colorScheme: "dark" });
await p.goto("http://localhost:3000/", { waitUntil: "networkidle" });
await p.waitForTimeout(1500);
const seen = await p.evaluate(() => ({
title: document.title,
wordmark: document.querySelector(".jac-rail-name")?.textContent,
sub: document.querySelector(".jac-rail-sub")?.textContent,
crumb: document.querySelector(".jac-crumb")?.textContent?.trim(),
anyLowell: /lowell/i.test(document.body.innerText),
}));
console.log(JSON.stringify(seen, null, 2));
await p.screenshot({ path: "tour/lab/lovelace.png" });
await b.close();