🎙 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 8 of 10

Where should the browser be created and closed in the framework?

Where should the browser be created and closed in the framework?

  1. A.Inside each page object
  2. B.Inside every test method by hand
  3. C.In a shared base test class using a driver factory
  4. D.In testng.xml only
Answer & explanation

Correct answer: In a shared base test class using a driver factory

BaseUiTest opens the browser, saves a screenshot on failure and quits.

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 →