import { chromium } from 'playwright'; const b = await chromium.launch(); const ctx = await b.newContext({ viewport:{width:1280,height:900} }); const p = await ctx.newPage(); const cdp = await ctx.newCDPSession(p); await cdp.send('Network.enable'); await cdp.send('Network.setCacheDisabled', { cacheDisabled: true }); await cdp.send('Network.emulateNetworkConditions', { offline:false, latency:150, downloadThroughput: 900*1024/8, uploadThroughput: 400*1024/8 }); p.goto('https://www.novalon.cn/contact', { waitUntil:'commit', timeout:90000 }).catch(()=>{}); for (let i=0;i<8;i++) { await p.waitForTimeout(1000); const s = await p.evaluate(() => { const h1 = document.querySelector('h1'); const ready = document.documentElement.getAttribute('data-content-ready'); const text = (document.body?.innerText||'').trim().length; const zeros = [...document.querySelectorAll('body *')].filter(e=>parseFloat(getComputedStyle(e).opacity)===0).length; return { t: Math.round(performance.now()), h1: !!h1, h1txt: h1?.innerText?.slice(0,20) ?? null, h1op: h1 ? getComputedStyle(h1).opacity : null, ready, text, zeros, parentOp: h1?.parentElement ? getComputedStyle(h1.parentElement).opacity : null }; }).catch(()=>null); console.log(JSON.stringify(s)); if (s && s.h1op === '1') break; } await p.screenshot({ path:'docs/acceptance/2026-10-20-prod-about/contact-cold.png' }); await b.close();