selenium open new window code example Example: open new window in selenium driver.execute_script("window.open('https://twitter.com')")