Steps to reproduce the problem.
1.When i open a link with following href
it takes me to a page that is on different domain and opens in new tab.
The url for the link is generated from an attribute in form tag and the credentials
are taken from input tag attributes.
Expected Output: getWindowHandles() should return set of window handles.
Actual Output: script gets stuck as soon as i use driver.getWindowHandles(). The statements
next to it dont get executed.
I am unable to switch to new tab with ChromeDriver.
NOTE: The problem is only with ChromeDriver. I tried running the same script using
FirefoxDriver and it works fine and i am able to switch to new tab and perform actions
Selenium version:Tried on 2.3.0 , 2.7.0 and 2.11.0
Reported by aditya.dhingra89 on 2011-11-14 11:38:36
The text was updated successfully, but these errors were encountered:
Instead of describing how the page in question behaves, it would be useful if you could
provide a reduced example (HTML/JS/CSS + WebDriver code) that will let us reproduce
the problem. We have tests for getWindowHandles that are happily passing with Chrome,
so this isn't a general problem.
I have created small sandbox for you to understand the issue.
Kindly find the link below.
When i click on the 'Gmail link' on the page it takes me to Gmail login page which
gets opened in new tab. And I am not able to switch to that tab and even getWindowHandles()
doesn't show anything when i try to print the set and the program gets stuck as soon
as I use getWindowHandles(). But that problem is only with ChromeDriver.It works perfectly
fine with FirefoxDriver.
Reported by aditya.dhingra89 on 2011-11-30 10:45:40
This is the WebDriver code that I am using :-
WebDriver driver = new ChromeDriver();
Set<String> windows = driver.getWindowHandles();
Reported by aditya.dhingra89 on 2011-11-30 12:01:13
Update: ChromeDriver gets stuck after clicking the particular anchor tag.
HTML to reproduce the problem:
<form target="_blank" style="display:none;" name="gmail_login" method="POST" action="https://mail.google.com">
Reported by aditya.dhingra89 on 2012-02-28 07:31:40