16 / 139 · 13 Browser Automation with Playwright · Pre-Requisites: Discover the Application and Produce Customization Artifacts← prev⊞ allnext →☰ Read as one page
1.16Step 10 — Generate `playwright-scaffolding.md`
This is the most important artifact in the chapter.
playwright-scaffolding.md is the custom blueprint Claude Code will use in the next chapter to scaffold the repo.
It should be derived from:
- the generic harness principles
product-under-test.mdui-journeys.mdapi-endpoints.md
What playwright-scaffolding.md must contain
At minimum, it should specify:
- real page-object names
- real feature domains
- real API client groupings
- fixture strategy
- likely flow helpers
- likely reusable component objects
- likely smoke/regression/a11y grouping
- auth strategy
- expected environments
- early plan and agent workflow expectations
- rules like “selectors live in page objects”
- rules like “use Playwright APIRequestContext for API clients”
Copy-paste prompt for Claude Code
Create playwright-scaffolding.md by reconciling the generic Playwright harness architecture with the real application structure captured in:
- docs/specs/product-under-test.md
- docs/specs/ui-journeys.md
- docs/specs/api-endpoints.md
Rules:
- replace generic names with real application terminology
- keep the harness architecture, but customize folder and file naming to the product
- define likely page objects, API clients, flows, reusable components, fixtures, and starter test groupings
- encode agent workflow expectations for planner, generator, and evaluator
- assume Playwright + TypeScript for UI and API automation
- assume Playwright APIRequestContext for API tests unless the app clearly requires otherwise
- assume selectors should live inside the owning page objects
Write the result to:
- playwright-scaffolding.md