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