This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 29003 - Order window handles
Summary: Order window handles
Status: NEW
Alias: None
Product: Browser Test/Tools WG
Classification: Unclassified
Component: WebDriver (show other bugs)
Version: unspecified
Hardware: PC Linux
: P2 normal
Target Milestone: ---
Assignee: Browser Testing and Tools WG
QA Contact: Browser Testing and Tools WG
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-07-29 13:50 UTC by Andreas Tolfsen
Modified: 2015-07-29 13:50 UTC (History)
1 user (show)

See Also:


Attachments

Description Andreas Tolfsen 2015-07-29 13:50:20 UTC
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.