const { chromium } = require('@playwright/test'); (async () => { const browser = await chromium.launch(); const page = await browser.newPage(); await page.goto('http://localhost/geograsim/App/sims/weltkueche/game.html'); await page.waitForTimeout(2500); const r = await page.evaluate(() => { if (typeof startTutorial !== 'function') return { error: 'no startTutorial' }; try { startTutorial(); const ov = document.getElementById('tutorial-overlay'); const title = ov?.querySelector('h2, .tutorial-title, [class*=title]')?.textContent; return { ok:true, openedOverlay: !!ov, firstTitle: title }; } catch (e) { return { error: String(e) }; } }); console.log(JSON.stringify(r)); await browser.close(); })();