Build a Playwright Framework the Right Way — Live Code Walkthrough

How to build a Playwright framework with an architecture that scales — walked through file by file. In this ArchQA Conversation, Stefan Minchev and I open the actual Playwright Scaffold and show you the exact decisions behind a framework that served 5 QAs across 5 teams on a huge trading platform: the non-negotiables first, then four pillars that pay off. In this episode we start with the non-negotiables (await everything, types from line one, a selector hierarchy), then build the framework around four pillars: a single source of truth (enums + env + Zod, with types via z.infer), design patterns (Page Object as a fixture so you never write new Page() in a test, plus composition over inheritance — where Stefan and I disagree), test-data management (static as const vs Faker factories, with setup and teardown that survive parallel runs), and enforcement that fails the build (ESLint, Prettier, Husky) — plus exactly what to do Monday morning on a messy suite you can't rewrite. ⏱ Timestamps: 0:00 - What can you do tomorrow morning? 0:30 - Intro 1:04 - The non-negotiables: await, types, selectors 3:56 - Pillar 1 — single source of truth: enums, env, Zod 7:13 - Pillar 2 — design patterns: POM as a fixture + composition over inheritance (where we disagree) 14:14 - Pillar 3 — test data: setup & teardown that survive parallel runs 16:42 - Pillar 4 — enforce the rules so they can't rot (ESLint, Prettier, Husky) 20:37 - Closing 📺 Full ArchQA, Unscripted playlist:    • ArchQA, Unscripted   Previous: What Is Test Automation Architecture —    • What Is Playwright Test Automation Archite...   Previous: The Real Cost of Bad Playwright Test Automation Architecture —    • The Real Cost of Bad Playwright Test Autom...   Next: Stop Setting Up Playwright From Scratch — Bring a Scaffold to Every Project -    • Stop Setting Up Playwright From Scratch — ...   Subscribe for ‪@ArchQA‬ 🔗 Connect with Stefan: Stefan's LinkedIn:   / stefan-minchev-qa   🔗 Connect with me: Blog: https://idavidov.eu LinkedIn:   / ivdavidov   GitHub: https://github.com/idavidov13 ❤️ Support my work: https://buymeacoffee.com/idavidov #playwright #typescript #framework #qa #softwaredevelopment #softwaretesting #api #ui #testing #quality #qualityassurance #testautomation #engineering