Skip to main content

Get Window

Command description

Gets a window object by title, contained element, active window, or desktop. The returned object can be used by commands such as Activate Window and Close Window. The command reports an error if no matching window exists.

Command Input Parameters

input parametersInput parameter typeDescription
Retrieval MethodenumTitle, Window Containing Element, Active Window, Desktop
TitlestrText contained in the target window's title. Required when Retrieval Method is Title
ElementWinElement or str (captured element UID, not element name, not ms-rpa-id)Element contained in the target window. Required when Retrieval Method is Window Containing Element. Select a captured element or use Get Desktop Element, Get Similar Desktop Elements, or Get Related Desktop Elements

Command Output Parameters

Output parametersOutput parameter typeDescription
Window ObjectWindowInstanceMatching window

Type definition reference

tip