how to close windows in selenium python without quitting the browser code example
Example: how to close windows in selenium python without quitting the browser
for handle in driver.window_handles:
driver.switch_to.window(handle)
driver.close()