Perform automated and live-interactive testing on 3000+ real desktop and mobile devices online.
In Selenium, driver.close() and driver.quit() both close the browser windows or quit the driver instance, but there is a slight difference between the two commands.
`driver.close()`: The driver.close() method is used to close the current browser window that the driver instance controls. If there is only one browser window, this command will also quit the driver instance. Otherwise, it will close only the current window and continue to run.
`driver.quit()`: The driver.quit() method closes all the browser windows opened by the driver instance and ends the WebDriver session. This command should be used when you are done with the WebDriver instance and want to clean up the resources it uses.
Test your websites, web-apps, or mobile apps seamlessly with LambdaTest.
Start Free TestingEarn resume-worthy Selenium certifications that help you land a top job.
Learn MoreTest orchestration and execution cloud of 3000+ browsers and OS
24/7 support
Enterprise grade security
Fastest test execution cloud