_holive.mjs
import { chromium } from 'playwright';
const b = await chromium.launch({ channel:'chrome', headless:true });
const ctx = await b.newContext({ viewport:{width:1440,height:900}, httpCredentials:{username:'admin',password:'DW2024!'} });
const p = await ctx.newPage();
const B='https://marketing.designerwallcoverings.com'; const out={};
await p.goto(B+'/#quickpost',{waitUntil:'domcontentloaded',timeout:60000}); await p.waitForTimeout(2500);
out.platforms = await p.$$eval('#qp-buttons .qp-btn[data-qp]', e=>e.map(x=>x.getAttribute('data-qp')));
out.hasLive = await p.$('#qp-buttons .qp-live') ? true : false;
await p.fill('#qp-media','https://example.com/x.jpg'); await p.fill('#qp-caption','live handoff prod check');
await p.click('#qp-buttons .qp-live'); await p.waitForTimeout(3500);
out.hash = await p.evaluate(()=>location.hash);
out.manualActive = await p.$eval('.cmp2-tab[data-tab="manual"]', e=>e.classList.contains('active')).catch(()=>false);
out.prefilledCaption = await p.$eval('[data-pane="manual"] #cmp-caption', e=>e.value).catch(()=>null);
out.preselected = await p.$$eval('[data-pane="manual"] #cmp-targets input[data-ch]:checked', e=>e.map(x=>x.getAttribute('data-ch'))).catch(()=>[]);
await b.close();
console.log(JSON.stringify(out));