python selenium close all tabs code example
Example 1: how to close a webpage using selenium driver python
driver.quit()
Example 2: close tab selenium python
There's nothing easier and clearer than just running JavaScript.
Open new tab: driver.execute_script("window.open('');")