1

In Opera, I am trying to close all tabs by using driver.close but the last tab does not close the browser.

Anyone know how to close the browser completely or disable this Speed Dial?

enter image description here

Ekoar
  • 431
  • 1
  • 7
  • 20

2 Answers2

2

use driver.quit instead of driver.close

This will close all instances of browser.

driver.close

will only close the instance of browser which WebDriver is currently focusing on.

cruisepandey
  • 28,520
  • 6
  • 20
  • 38
0

Use quit() as it is closes all tabs

driver.quit();
iamsankalp89
  • 4,607
  • 2
  • 15
  • 36