const { chromium } = require('@playwright/test'); (async () => { const b = await chromium.launch(); const p = await b.newPage(); const errs=[]; p.on('pageerror',e=>errs.push(e.message)); p.on('console',m=>{if(m.type()==='error')errs.push(m.text());}); await p.route('**/login.html', r=>r.abort()); await p.goto('http://localhost/geograsim/App/teacher.html',{waitUntil:'domcontentloaded'}).catch(()=>{}); await p.waitForTimeout(1200); const r = await p.evaluate(() => ({ hasSimWord: typeof simWord==='function', hasSimCode: typeof simCode==='function', logistikWord: typeof simWord==='function' ? simWord('logistik') : null, logistikCode: typeof simCode==='function' ? simCode('logistik') : null, unknownCode: typeof simCode==='function' ? simCode('irgendwas') : null, logistikFields: (typeof LIVE_PRIMARY_FIELDS==='object' && LIVE_PRIMARY_FIELDS.logistik) ? LIVE_PRIMARY_FIELDS.logistik.map(f=>f.label) : null, liveShortLogistik: typeof LIVE_SIM_SHORT==='object' ? LIVE_SIM_SHORT.logistik : null, // Kürzel-Eindeutigkeit codesUnique: (function(){ if(typeof SIM_LABELS!=='object') return null; var seen={},dup=[]; Object.keys(SIM_LABELS).forEach(k=>{var c=SIM_LABELS[k].c; if(seen[c])dup.push(c); seen[c]=1;}); return dup; })(), })); console.log(JSON.stringify({result:r, pageErrors:errs}, null, 2)); await b.close(); })();