quit() vs close()driver.close(): Closes only the current window/tab. The browser session stays alive.
- driver.quit(): Terminates the entire WebDriver session and cleans up the browser OS process.from selenium import webdriverdriver = webdriver.Chrome()
driver.get("https://targetqa.com")
driver.quit()