how to close selenium webdriver python code example Example 1: close selenium webdriver python driver.close() Example 2: how to close a webpage using selenium driver python driver.quit()