Cómo cerrar ventanas en Selenium Python sin dejar el navegador
for handle in driver.window_handles:
driver.switch_to.window(handle)
driver.close()
Lovely Lobster
for handle in driver.window_handles:
driver.switch_to.window(handle)
driver.close()