const { chromium } = require('@playwright/test'); (async () => { const browser = await chromium.launch(); const page = await browser.newPage(); const errors = []; page.on('pageerror', err => errors.push('PAGEERROR: ' + err.message)); page.on('console', msg => { if (msg.type() === 'error') errors.push('CONSOLE: ' + msg.text().substring(0,200)); }); await page.goto('http://localhost/geograsim/App/fluss?level=1'); await page.waitForTimeout(3000); const out = await page.evaluate(() => ({ hasGGS: typeof window.__GGS__ === 'object', hasLive: typeof window.__GGS_LIVE__ === 'object', activeMs: window.__GGS_LIVE__ && window.__GGS_LIVE__.activeMs, idleMs: window.__GGS_LIVE__ && window.__GGS_LIVE__.idleMs, maxSession: window.__GGS_LIVE__ && window.__GGS_LIVE__.MAX_SESSION_MS, idleThresh: window.__GGS_LIVE__ && window.__GGS_LIVE__.IDLE_THRESHOLD_MS, stateScore: (window.GGS_LIVE_STATE && window.GGS_LIVE_STATE()) || null, })); console.log('Local Fluss after 3s:'); console.log(JSON.stringify(out, null, 2)); if (errors.length) console.log('ERRORS:', errors); await browser.close(); })();