← back to Cronjobs Viewer
5x/creds-url-test.js
14 lines
const pw = require('/Users/macstudio3/.npm-global/lib/node_modules/playwright');
const CHROME='/Applications/Google Chrome.app/Contents/MacOS/Google Chrome';
(async()=>{
const b=await pw.chromium.launch({executablePath:CHROME});
const ctx=await b.newContext(); 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));
// open WITH creds embedded in the URL — the exact bug the guard prevents
await p.goto('http://admin:DW2024!@127.0.0.1:9772/',{waitUntil:'networkidle',timeout:20000}).catch(e=>errs.push('GOTO '+e.message));
await p.waitForTimeout(1500);
const cards=await p.$$eval('.host',els=>els.length).catch(()=>0);
console.log('cards rendered:',cards,'| console errors:',errs.length?errs.join(' || '):'none');
await b.close();
})();