const { chromium } = require('@playwright/test'); (async () => { const browser = await chromium.launch(); const page = await browser.newPage(); const res = await page.goto('http://localhost/geograsim/App/modul-weltkueche'); await page.waitForTimeout(700); const r = await page.evaluate(() => { const sec = document.getElementById('lehrplan-bezug'); const komps = [...document.querySelectorAll('.md-kompetenz .md-kompetenz-title')].map(e=>e.textContent.trim()); const anchors = document.querySelectorAll('.md-anchor').length; const countryChips = [...document.querySelectorAll('.md-lehrplan-filters .md-chip')].map(c=>c.textContent.trim()); const empty = document.body.textContent.includes('Noch keine Kompetenzen zugeordnet'); return { hasSection: !!sec, kompetenzTitles: komps, anchorCount: anchors, countryChips, showsEmpty: empty }; }); console.log(JSON.stringify({ httpStatus: res.status(), result: r }, null, 2)); await browser.close(); })();