Playwright · Middle · Question 59 of 75
Where should assertions live in a Page Object Model?
- 1Mostly in tests; page objects expose actions and locators
- 2Only in page objects, never in the tests themselves
- 3In a separate global file run after all tests
Show the answer
Correct answer: Mostly in tests; page objects expose actions and locators
Explanation
Keeping checks in tests shows what each test verifies. Page objects can offer helper assertions, but hiding all checks makes tests unclear.