Atlas › 13 Browser Automation with Playwright › Pre-Requisites: Discover the Application and Produce Customization Artifacts☰ Read as one page
Pre-Requisites: Discover the Application and Produce Customization Artifacts
1.1Why this chapter existsDo not start a real Playwright automation repo from a generic harness template alone.1.2Set up Claude Code for discoveryBefore you explore the application, configure Claude Code so it works safely and efficiently during the discovery phase.1.3End state of this chapterBy the end of this chapter, you must have these files:1.4Core ruleThe application is the source of truth. The generic template is only the starting shape.1.5Discovery priority orderWhen learning a product, use the richest source you have. In most cases, use this order:1.6What Claude Code should learn during discoveryBefore any repo is scaffolded, Claude Code should extract:1.7Step 1 — Create a discovery workspaceBefore exploring the application, create the following folders locally in your future repo or in a scratch project folder:1.8Step 2 — Inspect the Site Map, if one existsIf the application has a visible Site Map page, start there. This is often the fastest way to capture the product’s real information…1.9Step 3 — If there is no Site Map, traverse the app deliberatelyIf no Site Map exists, discover structure from navigation and exploratory traversal.1.10Step 4 — Discover authentication and session behaviorA Playwright harness becomes much better when auth behavior is understood before scaffolding.1.11Step 5 — Discover the UI journeys that actually matterA good harness does not start by automating random pages. It starts with meaningful journeys.1.12Step 6 — Discover the API surfaceThe harness should support API automation from day one, ideally using Playwright APIRequestContext.1.13Step 7 — Write `docs/specs/product-under-test.md`This file is the highest-level description of the system under test.1.14Step 8 — Write `docs/specs/ui-journeys.md`This file defines where early UI automation should go. Talk to your product owner/product manager. Capture everything they respond to the…1.15Step 9 — Write `docs/specs/api-endpoints.md`This file tells the scaffolding step how API clients should be organized.1.16Step 10 — Generate `playwright-scaffolding.md`This is the most important artifact in the chapter.1.17Step 11 — Validate the artifacts before moving onBefore you continue to the next chapter, review the artifacts.1.18What not to do in this chapterDo not:1.19Deliverables from Chapter 1You are ready for the next chapter only when these files exist and are usable:1.20Mental modelThat custom blueprint is playwright-scaffolding.md.