• Home
  • Recent Q&A
  • Java
  • Cloud
  • JavaScript
  • Python
  • SQL
  • PHP
  • HTML
  • C++
  • Data Science
  • DBMS
  • Devops
  • Hadoop
  • Machine Learning
in Selenium by
Q:
What is the difference between driver.close() and driver.quit() methods?

1 Answer

0 votes
by
Purpose of these two methods (driver.close and driver.quit) is almost same. Both allow us to close a browser but still, there is a difference.

driver.close(): To close current WebDriver instance

driver.quit(): To close all the opened WebDriver instances

Related questions

0 votes
asked Aug 22, 2019 in Selenium by john ganales
+1 vote
asked Aug 22, 2019 in Selenium by john ganales
...