← All topics
Quiz: Page Object Model: questions with answers
10 questions, each with the answer and a short explanation.
Take the timed quiz + get a certificate →- Q1. What is the main benefit of the Page Object Model?
- Q2. Where should assertions live in a POM framework?
- Q3. Why does loginAs() return a DashboardPage?
- Q4. Why store By locators instead of WebElement fields?
- Q5. In an interview, how should you explain your framework?
- Q6. In the Page Object Model, why are locators kept private inside page classes?
- Q7. Which is a good page-object method name?
- Q8. Where should the browser be created and closed in the framework?
- Q9. Why are URLs and browser names passed with -D properties instead of hard-coded?
- Q10. A tester puts Assert.assertEquals(...) inside LoginPage. What is wrong?