exit program python but selenium not quit 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()
for handle in driver.window_handles:
driver.switch_to.window(handle)
driver.close()