const { chromium } = require('playwright'); const fs = require('fs'); (async () => { const browser = await chromium.connectOverCDP('http://localhost:9222'); const contexts = browser.contexts(); const page = contexts[0].pages()[0]; await page.bringToFront(); await page.waitForTimeout(1000); await page.screenshot({ path: 'C:/Users/Administrator/Desktop/studyos-screen.png', fullPage: false }); console.log('Screenshot saved'); const title = await page.title(); const html = await page.content(); console.log('Title:', title); console.log('Has #root:', html.includes('id="root"')); console.log('Has sidebar:', html.includes('sidebar')); console.log('Has chat:', html.includes('mainchat')); await browser.close(); })();