selenium save when browser closes code example Example: how to close a webpage using selenium driver python driver.quit()