▲ | sa46 2 days ago | |
> Page Object Models trade off clarity for encapsulation [and] obscure what's actually happening. This argument also applies to using a function for abstraction. I've just written a few dozen e2e tests with Playwright. The code looks like:
Each of those lines is 3 to 20 lines of Playwright code. Aggressive DRY is bad, but Page Object Models are usually worth it to reduce duplication and limit churn from UI changes. |