import { chromium } from "playwright"; const b = await chromium.launch(); const p = await b.newPage({ viewport: { width: 1500, height: 1000 } }); await p.goto("http://localhost:8351/access"); await p.fill('input[name=passcode]', "test1234"); await p.click("button"); await p.waitForURL("http://localhost:8351/"); await p.waitForTimeout(3500); await p.screenshot({ path: "/tmp/shot-home.png", fullPage: true }); const sid = (await (await fetch("http://127.0.0.1:8350/api/sessions?limit=1")).json())[0].session_id; await p.goto(`http://localhost:8351/sessions/${sid}`); await p.waitForTimeout(3000); await p.screenshot({ path: "/tmp/shot-session.png", fullPage: true }); await p.click("text=world model"); await p.waitForTimeout(3500); await p.screenshot({ path: "/tmp/shot-world.png" }); await p.goto(`http://localhost:8351/platforms/youtube`); await p.waitForTimeout(2500); await p.screenshot({ path: "/tmp/shot-platform.png", fullPage: true }); await p.goto(`http://localhost:8351/jobs`); await p.waitForTimeout(2500); await p.screenshot({ path: "/tmp/shot-jobs.png" }); const errs = []; p.on("console", m => { if (m.type()==="error") errs.push(m.text()); }); await p.goto(`http://localhost:8351/entities`); await p.waitForTimeout(2500); await p.screenshot({ path: "/tmp/shot-entities.png" }); console.log("errors:", errs.slice(0,5)); await b.close();