← 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?
- A.Java requires a return value
- B.It models where the user lands, so the test continues on the right page
- C.To close the browser
- 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 →