SPB Git

spb/phi-conseil

Public
491 B · 6 lines javascript
1import { webkit, devices } from "@playwright/test";2const b = await webkit.launch(); const ctx = await b.newContext({ ...devices["iPhone 13"] }); const p = await ctx.newPage();3await p.goto(process.argv[2] ?? "http://127.0.0.1:3100/", { waitUntil: "networkidle" });4await p.getByRole("button", { name: "Ouvrir le menu" }).click(); await p.waitForTimeout(500);5await p.screenshot({ path: process.argv[3] ?? "docs/screenshots/menu-mobile-open.png" }); await b.close(); console.log("shot ok");6
Files · 986334f6f6688676835eaf88399856804855ca6d
Menu

Theme