import { test } from '@playwright/test' test('section screenshots', async ({ page }) => { await page.setViewportSize({ width: 1440, height: 900 }) await page.goto('http://localhost:3000/') await page.waitForLoadState('networkidle') // Hero const hero = page.locator('section').first() await hero.screenshot({ path: '/tmp/s-hero.png' }) // Each section const sections = await page.locator('section').all() for (let i = 0; i < sections.length; i++) { await sections[i]!.screenshot({ path: `/tmp/s-${i}.png` }) } console.log('Total sections:', sections.length) })