I have an issue with Selenium. I have a scenario:
Users opens a browser via script:
driver = webdriver.Firefox() driver.get ("some_startpage")
Then USER opens a new tab (the person clicks, it is done not by selenium, but manually).
I want to change one element on page in second tab, but my webdriver is focused on the first tab.
I've tried with driver.getWindowHandles()
to change webdriver focus, but it shows me only one handle (to the main window), and I cannot switch context to the second tab.
webdriver.tittle
shows the title of the second tab andwebdriver.current_url
shows the url of the first tab
But thats normall. I've read that selenium doesn't support tabs in browser.
My questions:
- Is there any work around (mayby js?) to operate on elements on second (third, fourth...) tab in browser?
- I don't want to open new browser window, and human must manually open tab, it can't be done via selenium.