import asyncio import json from playwright.async_api import async_playwright async def main(): async with async_playwright() as p: browser = await p.chromium.launch() page = await browser.new_page(viewport={'width': 390, 'height': 844}, reduced_motion='reduce') await page.goto('http://localhost:3010/social', wait_until='domcontentloaded') await page.wait_for_timeout(1000) print(json.dumps(await page.evaluate('''() => [...document.querySelectorAll('body *')].filter(e=>{ const r=e.getBoundingClientRect(),s=getComputedStyle(e); return r.right>innerWidth+2 && r.width>0 && !e.closest('svg') && s.position!=='fixed' && s.visibility!=='hidden' }).slice(0,25).map(e=>({tag:e.tagName,c:e.className,x:e.getBoundingClientRect().x,w:e.getBoundingClientRect().width}))'''))) await browser.close() asyncio.run(main())