Thursday, June 18, 2015

WebDriver.Close() Vs WebDriver.Quit()

WebDriver.Close() Vs WebDriver.Quit()

WebDriver.Close() closes the browser window that the driver has focus on. In other words WebDriver.Close() closes the current window.

WebDriver.Quit() on the other hand calls WebDriver.Dispose() which in turn closes all browser windows and ends the session. In other words WebDriver.Quit() closes the all associated windows.