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