Skip to main content


Command Description

Set the specified window to be active window in the foreground

Command Prototype


Parameter Description

objUiElementTruedecorator@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


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")