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