import { chromium } from 'playwright-core'; import { PAGE } from './paths.mjs'; const b = await chromium.launch({ executablePath: process.env.CH }); const errs = []; for (const [w, h] of [[1440, 900], [390, 844]]) { const p = await b.newPage({ viewport: { width: w, height: h } }); p.on('pageerror', e => errs.push(e.message)); await p.goto(PAGE('site/index.html')); await p.waitForTimeout(1200); await p.locator('#netx').screenshot({ path: `out/netx_${w}.png` }); const sw = await p.evaluate(() => document.documentElement.scrollWidth); if (sw !== w) errs.push(`${w} scrollWidth ${sw}`); await p.close(); } console.log('ERRORS', JSON.stringify(errs)); await b.close();