Set-Window

Change focus to another window.

Powershell

Change focus to another window.

Syntax

Set-Window [-sessionId ] [-windowName] []

Parameters

name description
sessionId (Optional) The identifier of the session to route the command to.
windowName The window to change focus to.

Examples

Set-Window "Native"

C#

Declaration

void OpenQA.Selenium.ITargetLocator.Window(string windowName);

Arguments:

type name description
string windowName The name of the window to select.

Examples

driver.SwitchTo().Window(driver.WindowHandles.Last());