The first most common cause is not waiting for the new window to appear before checking the result of getWindowHandles(). Try a Thread.sleep() to see if that fixes it. If it does, replace the hard-coded sleep() with something more appropriate, like a WebDriverWait.
The second most common cause is for Protected Mode settings to not be set the same for all zones. A quick search via Google on "WebDriver protected mode" shows a blog post that fully describes why it's needed, and why you should never use the "INTRODUCE_FLAKINESS" desired capability.
This functionality is not globally broken for all web sites with the IE driver. If it's not one of those two causes, further troubleshooting without an example page will be next to impossible.
To further troubleshoot the issue, we would need a sample set of pages that reproduce the problem. If you're unwilling[1] to provide a sample set of pages, there's no hope of being able to find the issue.
--Jim
[1] Yes, unwilling, not unable. See http://jimevansmusic.blogspot.com/2012/12/not-providing-html-page-is-bogus.html for reasons why I use this strident wording.
--
You received this message because you are subscribed to a topic in the Google Groups "Selenium Users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/selenium-users/Fy7wSGV_Kn0/unsubscribe.
To unsubscribe from this group and all its topics, send an email to selenium-user...@googlegroups.com.
To post to this group, send email to seleniu...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/58ebffff-08f3-4cc0-b481-391f82287add%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.