Header Ads

WHAT IS DIFFERENCE BETWEEN QUIT AND CLOSE IN SELENIUM WEBDRIVER?





Normally we are used following code to close browser in Selenium Webdriver script:
driver.quit();




In the above code WebDriver will completely get shutdown. No initialized driver instance would be available after using this code and all the browser windows would be closed.
We can use the following code to close the current browser window:
driver.close();
In the above code WebDriver will close the browser window only and Webdriver instance would be still run for other browser windows.






No comments


What would you like to add in my list? I look forward to reading your comments below.



Powered by Blogger.