Difference between webdriver.Dispose(), .Close() and .Quit()
1
webdriver.Close()
- method closes the browser instance which was opened by the WebDriver.
Suppose, during execution Webdriver had opened multiple browser windows. When
close() method is called, it will close only the browser instance opened by it.
2 webdriver.Quit() - It closes all
the browser windows that opened by the webdriver i.e. destroy the WebDriver
instance. Suppose, during execution Webdriver had opened multiple browser
windows. When quit() method is called, it will close all the browser
windows opened by Selenium WebDriver.
3 webdriver.close() - closes the browser window on which
the focus is set.
If there are more than one Browser window opened
by the Selenium Automation, then the close( ) command will only close the
Browser window which is having focus at that time. It wont close the remaining
Browser window
0 comments:
Post a Comment