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

What is API?

In general way, API (Application Programming Interface) is the intermediate software which is useful for two applications to communicate. API is the tool which is used for interaction of two applications. If developer developing any software which have multiple blocks (Modules) than developer use APIs to put them together.

Smoke Testing

In Smoke Testing, Testing team check the key feature or key bugs of the software. Smoke testing ensure that critical functionality of the software is working fine.If key features are not working then it is no needed to test the overall functionality because it is just waste of time. In Smoke Testing, test team check the basic feature of the software and if basic feature is not working it means software is broken very badly and further testing is unnecessary. If Smoke Testing failed then it is declared that build is unstable and revert back to developer team until smoke test is pass.

Structural Testing

Structural Testing is the type of testing in which user should have the knowledge of the code because in this testing user need to check the structure of the system. Structural Testing is White Box Testing.