← 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?
- A.It saves the test report
- B.Otherwise browser processes stay open and pile up, slowing or crashing later runs
- C.It clears the browser history only
- 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 →