import { chromium } from 'playwright'; const b = await chromium.launch(); const p = await b.newPage({ viewport: { width: 1180, height: 820 } }); const errs = []; p.on('pageerror', e => errs.push('PAGEERR: ' + e.message)); p.on('console', m => { if (m.type() === 'error') errs.push('CONSOLE: ' + m.text()); }); await p.goto('http://localhost:8099', { waitUntil: 'networkidle' }); await p.getByRole('button', { name: 'MFD', exact: true }).click(); await p.waitForTimeout(1500); const apKeys = await p.$$eval('.ap-key', els => els.map(e => e.textContent)); const title = await p.$eval('.bezel-title', e => e.textContent).catch(() => null); console.log('AP keys on MFD:', JSON.stringify(apKeys)); console.log('Bezel title:', title); console.log('Errors:', errs.length ? errs.join(' | ') : 'NONE'); await b.close();