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.

How You Can Test Database?

Now we know the Database Testing which you can learn in my last article. In this article we will discuss about the steps that need to following to test any Database. Database Tester should have some basic knowledge regarding SQL Command like DDL (create/drop),  DML (Insert/Delete/Update) and DCL (Grant/Revoke).

Record and Play Back in JMeter

In this section we will discuss about how to record a Test script than how we can play back that script in the browser. First we develop a  a Test Script than put a load of suppose 100 users and than run the test script again with this load while Test executing than we are getting result in performance matrices that how the Test performing in different number of users.