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

Quiz: Selenium Setup · Question 9 of 10

Why should every test end by calling driver.quit(), usually in an @AfterMethod?

Why should every test end by calling driver.quit(), usually in an @AfterMethod?

  1. A.It saves the test report
  2. B.Otherwise browser processes stay open and pile up, slowing or crashing later runs
  3. C.It clears the browser history only
  4. D.It is required for assertions to work
Answer & explanation

Correct answer: Otherwise browser processes stay open and pile up, slowing or crashing later runs

quit ends the whole WebDriver session and its windows.

Can you get the rest right without peeking?

Take the timed Quiz: Selenium Setup quiz free. Pass it to earn XP and count towards your certificate.

Start the quiz →