import {chromium} from 'playwright'; const b = await chromium.launch({channel: 'chrome'}); const p = await b.newPage({viewport: {width: 390, height: 780}, isMobile: true, hasTouch: true}); await p.goto('http://localhost/s/stay', {waitUntil: 'domcontentloaded'}); await p.waitForTimeout(5000); console.log(await p.evaluate(() => { const h = document.querySelector('#root header'); const group = h.querySelector('.shell > div:last-child'); return JSON.stringify([...group.children].map((el) => ({ tag: el.tagName, id: el.id || '-', cls: (el.className || '').toString().slice(0, 55), label: el.getAttribute('aria-label') || el.textContent.trim().slice(0, 12), w: Math.round(el.getBoundingClientRect().width), })), null, 1); })); await b.close();