import { chromium } from '@playwright/test'; import fs from 'fs'; (async () => { const browser = await chromium.launch(); const page = await browser.newPage(); try { console.log('1. Navigating to Login Page...'); await page.goto('http://localhost:5265/Account/Login'); await page.screenshot({ path: './playwright-step1-login.png', fullPage: true }); console.log('2. Filling credentials (admin / admin)...'); await page.fill('input[name="username"]', 'admin'); await page.fill('input[name="password"]', 'admin'); console.log('3. Submitting login form...'); await Promise.all([ page.waitForNavigation({ waitUntil: 'load', timeout: 10000 }), page.click('button[type="submit"]') ]); console.log(`4. Successfully logged in! Current URL: ${page.url()}`); await page.screenshot({ path: './playwright-step2-dashboard.png', fullPage: true }); console.log('5. Navigating to DB Management Page (Type 2 Split View)...'); await page.goto('http://localhost:5265/Admin/Database'); await page.screenshot({ path: './playwright-step3-database.png', fullPage: true }); console.log('✓✓✓ ALL PLAYWRIGHT UI HARNESS TESTS PASSED PERFECTLY!'); } catch (e) { console.error('Playwright Test Failed:', e); } finally { await browser.close(); } })();