So I am trying to open websites on new tabs inside my WebDriver. I want to do this, because opening a new WebDriver for each website takes about 3.5secs using PhantomJS, I w
After struggling for so long the below method worked for me:
driver.find_element_by_tag_name('body').send_keys(Keys.CONTROL + 't') driver.find_element_by_tag_name('body').send_keys(Keys.CONTROL + Keys.TAB) windows = driver.window_handles time.sleep(3) driver.switch_to.window(windows[1])