โ† Back to libraryQuestion 148 of 273
๐ŸงชSeleniumBeginner

driver.close() vs driver.quit()

๐Ÿ“– Detailed Explanation:

`close()` shuts down only the current window in focus. If multiple windows are open, the others remain active. `quit()` kills the entire WebDriver session, closes all open windows and tabs, and stops the driver executable process completely.

๐ŸŒ Real-World Example:

close() is like closing one tab in your browser. quit() is like closing the entire browser application.

๐ŸŽฏ Scenario-Based Interview Question:

You notice that after running 10 tests, your computer has 10 'chromedriver.exe' processes running in the background. Which command were you likely using?