how to close 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()