Skip to main content


Command Description

Get the path of the executable file of the program corresponding to the window

Command Prototype

sRet = Window.GetPath(objUiElement)

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


sRet,The variable used to save the output of the command.


TracePrint "--------------------Get file path--------------------" 
// --------------------------------------------------------
// [Remarks] Get the file path, this Demo uses IE to open Baidu
// Input parameter 1:
// objUiElement--target element

// Output parameters:
// sRet--the variable to which the output of the function call is saved

// Command prototype: sRet = Window.GetPath(objUiElement)
// --------------------------------------------------------

sRet = Window.GetPath(@ui"window_Baidu, you will know-User Configuration 1-MicrosoftEdge9")