import { chromium } from "@playwright/test"; const ID = process.argv[2]; const PORT = process.argv[3] ?? "3117"; const b = await chromium.launch(); const ctx = await b.newContext(); await ctx.addCookies([{ name: "qai_s", value: "tokAPI", url: `http://localhost:${PORT}` }]); const page = await ctx.newPage(); page.on("console", (m) => { if (m.type() === "error") console.log("QAI console", m.text().slice(0, 400)); }); page.on("pageerror", (e) => console.log("QAI pageerror", String(e).slice(0, 500))); await page.goto(`http://localhost:${PORT}/app/${ID}`, { waitUntil: "load" }); await page.waitForTimeout(6000); console.log("QAI report count", await page.locator("#report").count()); await b.close();