← Quiz: Page Object Model: all 10 questions
Quiz: Page Object Model · Question 10 of 10
A tester puts Assert.assertEquals(...) inside LoginPage. What is wrong?
A tester puts Assert.assertEquals(...) inside LoginPage. What is wrong?
- A.Nothing
- B.Pages should do things and read values; the test should decide what is correct
- C.Assertions only work in listeners
- D.LoginPage cannot import TestNG
Answer & explanation
Correct answer: Pages should do things and read values; the test should decide what is correct
Keeping assertions in tests makes pages reusable for both positive and negative tests.
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 →