Quantcast
Channel: Active questions tagged selenium - Stack Overflow
Viewing all articles
Browse latest Browse all 97825

New tab using Selenium Python

$
0
0

I want Selenium to check if a window is open in Chrome browser or not, if yes, then open a new tab to the existing window Else, open a new window.

Currently I am using:

from selenium import webdriver
driver = webdriver.Chrome(chromedriver)
driver.find_element_by_tag_name('body').send_keys(Keys.COMMAND + 't') 

But this does not open a new tab in an existing open window. Kindly help.


Viewing all articles
Browse latest Browse all 97825

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>