Get-WindowHandles

Retrieve the list of all window handles available to the session.

Powershell

Retrieve the list of all window handles available to the session. Returns: A list of window handles. The order in which the window handles are returned is arbitrary.

Syntax

Get-WindowHandles [[-sessionId] ] []

Parameters

name description
sessionId (Optional) The identifier of the session to route the command to.

Examples

Get-WindowHandles

C#

Declaration

ReadOnlyCollection OpenQA.Selenium.IWebDriver.WindowHandles;

Returns:

type description
ReadOnlyCollection The window handles of open browser windows.

Examples

driver.WindowHandles;