🎙 Free live masterclass · Sun, 29 Nov, 7:00 pm IST · Java Full Stack roadmap Register free →
Skills101
← 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 →
  1. Q1. What is the main benefit of the Page Object Model?
  2. Q2. Where should assertions live in a POM framework?
  3. Q3. Why does loginAs() return a DashboardPage?
  4. Q4. Why store By locators instead of WebElement fields?
  5. Q5. In an interview, how should you explain your framework?
  6. Q6. In the Page Object Model, why are locators kept private inside page classes?
  7. Q7. Which is a good page-object method name?
  8. Q8. Where should the browser be created and closed in the framework?
  9. Q9. Why are URLs and browser names passed with -D properties instead of hard-coded?
  10. Q10. A tester puts Assert.assertEquals(...) inside LoginPage. What is wrong?