import { chromium } from "playwright"; const TOK = process.argv[2]; const b = await chromium.launch(); const ctx = await b.newContext({ viewport:{width:1440,height:900}, deviceScaleFactor:1 }); async function ys(url){ const p = await ctx.newPage(); await p.goto("http://127.0.0.1:5173/",{waitUntil:"domcontentloaded"}); await p.evaluate((t)=>localStorage.setItem("airshelf_token",t),TOK); await p.goto(url,{waitUntil:"networkidle"}); await p.waitForTimeout(1000); return await p.evaluate(()=>{ const g=(sel)=>{const e=document.querySelector(sel);return e?Math.round(e.getBoundingClientRect().top):null;}; return { h1:g("h1"), heroTop:g(".factory-hero,.fx-hero,[class*='hero']"), card:g(".factory-card,[class*='factory-card']"), cta:g(".factory-cta .btn,[class*='factory'] .btn-primary"), section:g(".section-h"), tabs:g(".tabs"), toolbar:g(".toolbar") }; }); } console.log("MIRROR:", JSON.stringify(await ys("http://127.0.0.1:5173/exact/asset-factory.html"))); console.log("IMPL :", JSON.stringify(await ys("http://127.0.0.1:5173/asset-factory"))); await b.close();