← back to Sublease Agentabrams
tmp-shot-local.js
13 lines
const { chromium } = require('playwright-core');
(async () => {
const b = await chromium.launch();
const ctx = await b.newContext({ httpCredentials:{username:'Boomer',password:'Sublease2024!'}, viewport:{width:1440,height:1650} });
const p = await ctx.newPage();
const errs=[]; p.on('console',m=>{if(m.type()==='error')errs.push(m.text())}); p.on('pageerror',e=>errs.push('PAGEERR '+e.message));
await p.goto('http://localhost:9721/', { waitUntil:'networkidle', timeout:40000 });
await p.waitForTimeout(2500);
await p.screenshot({ path:'tmp-local.png' });
console.log('JS errors:', errs.length? errs.slice(0,5).join(' | ') : 'none');
await b.close();
})();