File size: 735 Bytes
afd56bc
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
import { chromium } from 'playwright';
import fs from 'fs';

(async () => {
    const browser = await chromium.launch();
    const context = await browser.newContext();
    const page = await context.newPage();
    
    page.on('console', msg => console.log('BROWSER CONSOLE:', msg.text()));
    page.on('pageerror', err => console.log('BROWSER ERROR:', err.message));
    
    console.log('Navigating to http://localhost:5173/');
    await page.goto('http://localhost:5173/');
    
    console.log('Waiting 5 seconds...');
    await page.waitForTimeout(5000);
    
    const html = await page.content();
    console.log('HTML Length:', html.length);
    fs.writeFileSync('debug-html.txt', html);
    
    await browser.close();
})();