Selenium close() & quit() methods

What are the difference between close() & quit() methods in selenium web driver?

Questions by akhilandeswari   answers by akhilandeswari

Showing Answers 1 - 9 of 9 Answers

Bareddy

  • Jan 2nd, 2016
 

close(): It is used to close the browser opened by webdriver. It is closes only one browser on which the control of webdriver is present.
Ex: driver.close().
Quit(): It is used to close the all windows opened by webdriver.
Ex: driver.quit().

  Was this answer useful?  Yes

nagashree

  • Jul 25th, 2017
 

close(): if we have opened many tabs, and if we want to close only one tab then we go for close().
quit(): if we want to close all the tabs which are opened at once(close browser at once), then we use
quit().

  Was this answer useful?  Yes

mp

  • Oct 6th, 2017
 

close(): It is used to close the browser opened by webdriver. It is closes currently working or active browser only.
Ex: driver.close().
Quit(): It is used to close the all windows opened by webdriver.
Ex: driver.quit().

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions