
The Scaffold: Playwright Project Structure Built for AI
Have you ever started a new Playwright project and spent the first two days just figuring out where things go? Where do selectors live? How do page objects get into tests? Where does test data belong? Most teams answer these questions ad hoc, and end up with a different answer every time. After a few months the codebase looks like that - a mix of conventions, inconsistencies, and copy-pasted patterns that no one quite owns. A scaffold solves this before it starts. But the one we're exploring here was designed with a twist. It wasn't just built for humans. It was built for AI agents to work with. 🤔 What Is a Scaffold? A scaffold is a pre-built project structure that answers all the "where does this go?" questions upfront. Before you write a single test, you already have: A folder for page objects A folder for test data A single import point for all fixtures Conventions for selectors, naming, and test structure Think of it like a city grid. Before buildings go up, the streets are laid. Y
Continue reading on Dev.to
Opens in a new tab



