🎙 Free live masterclass · Sun, 29 Nov, 7:00 pm IST · Java Full Stack roadmap Register free →
Skills101
← Quiz: Page Object Model: all 10 questions

Quiz: Page Object Model · Question 3 of 10

Why does loginAs() return a DashboardPage?

Why does loginAs() return a DashboardPage?

  1. A.Java requires a return value
  2. B.It models where the user lands, so the test continues on the right page
  3. C.To close the browser
  4. D.To retry the login
Answer & explanation

Correct answer: It models where the user lands, so the test continues on the right page

Fluent page methods make tests read like a user journey.

Can you get the rest right without peeking?

Take the timed Quiz: Page Object Model quiz free. Pass it to earn XP and count towards your certificate.

Start the quiz →