I am looking to open up multiple browsers with different sites, and navigate those said browsers. I have written the code to open up the initial browser and navigate freely. However, when I open up the second tab and command it to get a new site, it changes the first browser (initial Safari "tab") to the new site.
Example Shortened code:
from selenium import webdriver
from selenium.webdriver.common.keys import
Keys
browser = webdriver.Safari()
browser.get('https://twitter.com')
browser.find_element_by_tag_name('body').
send_keys(Keys.Command+'t')
browser.get('https://facebook.com')
At this point the "twitter tab (first tab)' changes to facebook, while the second tab, which is the one visibly in front, stays vacant.
How do I get the web-driver to control the second tab?