import 'dotenv/config'; import { chromium } from 'playwright'; const browser = await chromium.launch({ headless: true }); const page = await browser.newPage(); await page.goto(`${process.env.GITEA_URL}/user/login`); const elements = await page.evaluate(() => [...document.querySelectorAll('input, button')].map(el => ({ tag: el.tagName, type: (el as HTMLInputElement).type, name: (el as HTMLInputElement).name, id: el.id, class: el.className.slice(0, 60), value: (el as HTMLInputElement).value?.slice(0, 40), })) ); console.log(JSON.stringify(elements, null, 2)); await browser.close();