This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
Quoting thephilwells from https://github.com/w3c/webdriver/issues/39: Using the Java API, one should be able to do this List<String> handles = driver.getWindowHandles(); driver.switchTo().window(handles[1]); ..and able to reliably expect that they are viewing the second-oldest open window. This matters most when more than two windows are open, as when one needs to open more than one new window from the original window.