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