| 1 | import { chromium } from 'playwright'; |
| 2 | const OUT = (process.env.SCRATCH || '/tmp/elffuss-test'); |
| 3 | const b = await chromium.launch(); |
| 4 | const p = await b.newContext({ viewport: { width: 1280, height: 900 }, locale: 'es-ES' }).then(c => c.newPage()); |
| 5 | await p.goto('https://utopiaia.com/#elffuss', { waitUntil: 'networkidle' }).catch(()=>{}); |
| 6 | await p.waitForTimeout(3500); |
| 7 | // scroll a la sección elffuss y captura |
| 8 | await p.evaluate(() => document.querySelector('#elffuss')?.scrollIntoView()); |
| 9 | await p.waitForTimeout(1500); |
| 10 | await p.screenshot({ path: OUT + '/utopiaia_elffuss_section.png' }); |
| 11 | await b.close(); |
| 12 | console.log('OK'); |