Close & Quit
Posted in : Selenium Automation Tips
WebDriver offers two methods know Close and Quit, both of
them are used to exit the browser from current status. But why do we have two
methods, well there is a difference between these two
What is the difference between WebDriver Close and Quit
Close command is used to close the current
active window in the browser.
Quit command will close the entire browser
irrespective of how many windows/tabs/pop-ups are open.
Preferred to use when test is dealing with
multiple browser tabs or windows e.g. when a new tab is opened upon some
To be used when the interaction with the
driver object along with any associated window, tab or pop-up is not
One of the last statements of the automation
[contact-form-7 404 "Not Found"]