LambdaTest Community
Difference between webdriver.Dispose(), .Close() and .Quit()
General Discussions
automation-testing
,
selenium-testing
rhian-lewis
May 30, 2021, 7:48am
#1
What is the difference between these
Webdriver.Close()
Webdriver.Quit()
Webdriver.Dispose()
Which one to be used and when?
2 Likes
Asad_Ahmad
May 30, 2021, 7:57am
#2
webDriver.Close() - Close the browser window that the driver has focus of
webDriver.Quit() - Calls Dispose()
webDriver.Dispose() Closes all browser windows and safely ends the session
1 Like