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); await p.evaluate(() => document.querySelector('#itinerary').scrollIntoView({block: 'start'})); await p.waitForTimeout(1500); console.log(await p.evaluate(() => { const itin = document.querySelector('#itinerary'); const out = []; itin.querySelectorAll('*').forEach((el) => { const s = getComputedStyle(el); const dx = el.scrollWidth - el.clientWidth; if (dx > 20) out.push({tag: el.tagName, overflowX: s.overflowX, dx, cls: (el.className || '').toString().slice(0, 60)}); }); return JSON.stringify({found: out.slice(0, 6), scrollY: Math.round(window.scrollY)}, null, 1); })); await b.close();