Selenium won't open a new URL in a new tab (Python & Chrome)
<p>I want to open quite a few URLs in different tabs using Selenium WebDriver &amp; Python.</p>

<p>I am not sure what is going wrong:</p>

<pre><code>driver = webdriver.Chrome()
driver.get(url1)
time.sleep(5)
driver.find_element_by_tag_name('body').send_keys(Keys.CONTROL+'t')
url2 = 'https://www.google.com'
driver.get(item2)
</code></pre>

<p>I looked up tutorials and it seems to me as though this code should do what I want.  What actually happens is the browser opens, url1 opens as it should, a new tab opens as it should <em>but</em> url2 then loads in the original tab instead of the new one (even though the new tab appears to be the active one).</p>

<p>(I am using Chrome because when using Firefox I can't get it to load any URLs at all.  Firefox opens but does not get the url requested.  I have tried to find a solution to this but to no avail.)</p>

<p>Is there anything I can change in my code to get the new URL to open in the new tab?</p>

<p>Thanks for your help!</p>