12 lines
647 B
JavaScript
12 lines
647 B
JavaScript
import puppeteer from 'puppeteer';
|
|
const b = await puppeteer.launch({ args:['--no-sandbox','--disable-setuid-sandbox','--use-gl=angle','--enable-unsafe-swiftshader'] });
|
|
const p = await b.newPage();
|
|
await p.goto('http://10.200.201.3:4175/_lab/neu-card.html',{waitUntil:'load',timeout:60000});
|
|
const probe = async (sel) => p.evaluate((s)=>{
|
|
const e = document.querySelector(s); const cs=getComputedStyle(e);
|
|
return { bgImg: cs.backgroundImage.slice(0,60) };
|
|
}, sel);
|
|
console.log('DARK neu bgImg:', (await probe('#sec-final .neu-card')).bgImg);
|
|
console.log('DARK cc bgImg:', (await probe('#sec-contact .contact-card')).bgImg);
|
|
await b.close();
|