added product page

This commit is contained in:
Felix Klement committed 2026-09-18 16:56:44 +02:00
1 parent 4cda1ca41b
commit d97f541738
27 files changed
+1004 -69

No files matched your search

+18
View File
@@ -0,0 +1,18 @@
import { chromium } from 'playwright';
const [,, url, prefix, selector, width = '1440'] = process.argv;
const browser = await chromium.launch();
const page = await browser.newPage({ viewport: { width: Number(width), height: 1100 } });
await page.goto(url, { waitUntil: 'networkidle' });
const root = page.locator(selector);
const tabs = root.locator('[role="tab"]');
const n = await tabs.count();
for (let i = 0; i < n; i++) {
await tabs.nth(i).click();
await page.waitForTimeout(450);
const stage = root.locator('[data-stage-item][data-active]').first();
await stage.scrollIntoViewIfNeeded();
await page.waitForTimeout(200);
await stage.screenshot({ path: `${prefix}-${i}.png` });
}
console.log('tabs', n);
await browser.close();