Set-Active-Window
Command Description
Set the specified window to be active window in the foreground
Command Prototype
Window.SetActive(objUiElement)
Parameter Description
Parameter | Required | Type | Default | Description |
---|---|---|---|---|
objUiElement | True | decorator | @ui"" | Corresponding window object; when passed as an integer, it is used as a window handle; when passed as a string, it is used as a window feature to find all matched window to operate; when passed as a UiElement object, operate the window containing it |
Demo
TracePrint "--------------------Set Active Window--------------------"
// --------------------------------------------------------
// [Remarks] Set the active window, the Demo uses IE to open Baidu
// Input parameters:
// objUiElement--target element
// Command prototype: Window.SetActive(objUiElement)
// --------------------------------------------------------
Window.SetActive(@ui"window_Baidu, you will know-User Configuration 1-MicrosoftEdge")