Page objects vs Functional helpers
The debate on Page Object vs module pattern is really just Inheritance vs Composition. Inheritance (PO) is great for describing what something is; the page has x, y, z on it. Composition (module pattern) is great for describing what something does. Which one do you think best fits component based architecture, where components are the building blocks and get reused on pages? How about user flows? Components compose and if the pages which are built of components are abstracted with classes, there's over-abstraction and inevitable duplication In modern testing frameworks like Playwright and Cypress, strict Page Object Model (POM) can feel overkill, especially when: • You’re using data selectors (data-qa, data-cy) for stable locators. • The tools already offer powerful, built-in utilities for interacting with the UI. • You don’t need unnecessary abstraction layers that make debugging harder. 1️⃣ Unnecessary Abstraction • POM adds an extra layer that often doesn’t provide real value. • Modern test frameworks are already powerful enough without it. 2️⃣ Base Page Inheritance is Overkill • Having a BasePage class with generic methods (click(), fill()) just to wrap Playwright’s own API makes no sense. • Playwright already has page.locator(), page.click(), page.fill(), etc. 3️⃣ Harder Debugging • With POM, if a test fails, you often have to jump between multiple files to find what went wrong. • With direct helper functions, you see exactly what’s happening.

The debate on Page Object vs module pattern is really just Inheritance vs Composition. Inheritance (PO) is great for describing what something is; the page has x, y, z on it. Composition (module pattern) is great for describing what something does. Which one do you think best fits component based architecture, where components are the building blocks and get reused on pages? How about user flows?
Components compose and if the pages which are built of components are abstracted with classes, there's over-abstraction and inevitable duplication
In modern testing frameworks like Playwright and Cypress, strict Page Object Model (POM) can feel overkill, especially when:
• You’re using data selectors (data-qa, data-cy) for stable locators.
• The tools already offer powerful, built-in utilities for interacting with the UI.
• You don’t need unnecessary abstraction layers that make debugging harder.
1️⃣ Unnecessary Abstraction
• POM adds an extra layer that often doesn’t provide real value.
• Modern test frameworks are already powerful enough without it.
2️⃣ Base Page Inheritance is Overkill
• Having a BasePage class with generic methods (click(), fill()) just to wrap Playwright’s own API makes no sense.
• Playwright already has page.locator(), page.click(), page.fill(), etc.
3️⃣ Harder Debugging
• With POM, if a test fails, you often have to jump between multiple files to find what went wrong.
• With direct helper functions, you see exactly what’s happening.