Skip to main content

Difference Between close() and quit() in Selenium Web Driver

In Selenium Web Driver both are use to close the browser by using script but both have different meaning in terms of use. we need to understand both because we need to use both of them in different time to execution of Test Cases.

driver.quit() is used to closed all the browser session which generated by the web driver. while driver.close() just closed the browser session on which Selenium Web Driver focusing that time.

You should use driver.quit() when you want to close your program because if you didn't close it then file will not release your memory because of that you can stuck in memory leak problem.

driver.close() and driver.quit() work in same way when Selenium Web Driver open only single window but if Selenium Web Driver open multiple windows then both behave differently.

Comments

Popular posts from this blog

Why Jmeter is best option for Performance Testing?

There are multiple tools in market for performance testing of any software but Jmeter is the best solution among all of them due to some reason listed below 1) Jmeter is the open source application so users who use this application will not to pay anything. 2) You can use Jmeter for performance of any web application,  Databases and Web Services (REST and SOAP APIs). 3) Jmeter have the user friendly UI component so it is very easy to use. 4) Jmeter can be used to simulate to put maximum number of concurrent users on a server, network or object to test its strength or to analyze overall performance under different load types. 5) Jmeter also use for functional testing for static( JavaScript and HTML) and dynamic( JSP, Servlets and AJAX) resources. 6) Jmeter provides Verity of graphical representations for performance report so it is easy to understand.

Guide to Setup Selenium Web Driver

In this Article i am describing you how to setup Selenium Web Driver in your Machine Step 1: First You need to install Java in your Computer. To download the java Click Here