spb/phi-conseil
Public
1import { chromium } from "@playwright/test";2const [, , url, out, w, h, full] = process.argv;3const b = await chromium.launch();4const p = await b.newPage({ viewport: { width: +w, height: +(h || 900) } });5await p.goto(url, { waitUntil: "networkidle" });6await p.waitForTimeout(300);7await p.screenshot({ path: out, fullPage: full !== "0" });8await b.close();9console.log(out);10