← Quiz: Selenium Setup: all 10 questions
Quiz: Selenium Setup · Question 2 of 10
What is the difference between driver.close() and driver.quit()?
What is the difference between driver.close() and driver.quit()?
- A.close() closes the current window; quit() closes all windows and ends the driver session
- B.They are identical
- C.quit() only closes the current tab
- D.close() deletes the browser profile
Answer & explanation
Correct answer: close() closes the current window; quit() closes all windows and ends the driver session
Always call quit() at the end of a test.
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 →