Playwright · Middle · Question 59 of 75

Where should assertions live in a Page Object Model?

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.

Further reading

Problem with a question

Playwright · Middle · question 59

Test yourself

Take the Playwright · Middle quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz