Action logic involving Windows application elements follows the same process as for Web or Mobile automation.
Invoking Windows application
You can invoke a Windows application by using the command as follows. You will provide the path to the exe file in this command.
Command: Execute Windows System Command
Activating a Window
It is required to use a command to activate the parent window in the Action logic before you can write logic to interact with any elements inside that window. This must be the first statement before any other operations are performed inside the window. You can define a Window element just like a regular element in the repository and use the following command.
Command: Activate Window
Other Windows operations
Here are a few other useful commands for Window level operations. You can find a more exhaustive listing in the Command Explorer when developing Action logic.
|Send special key to desktop window||Sends a special key to the given desktop window.|
|Select menu item in desktop window||Selects the given menu item on the desktop window. Individual menu items must be separated with semicolons (e.g. File;New).|
|Press and hold down modifier key on desktop window||Presses and holds down a given modifier key (shift/ctrl/alt) on a desktop window.|
|Release modifier key on desktop window||Releases a given modifier key (shift/ctrl/alt) on a desktop window.|
|Activate desktop foreground window||Activates the current foreground window on the desktop. If failed to activate, subsequent commands on the Windows UI may fail.|
|Activate desktop window by title||Activates desktop window based on a given title. You do not need to save Window as an element.|
|Send special key to active desktop window||Sends a special key to the currently active window on the desktop.|
|Enter text in active desktop window||Enters given text at the current cursor position on the active desktop window.|
|Reset search parent to top level desktop window||Resets the search parent element to top level desktop window.|
|Get Windows clipboard text||Returns clipboard text from the Windows desktop.|
|Send special key to active desktop window (free form)||Sends a special key (free form) to the currently active window on the desktop.|
|Press and hold down modifier key on active desktop Window||Presses and holds down a given modifier key on active desktop window|
|Release modifier key on active desktop window||Release a given modifer key on the active window|
Window Element Operations
Here are some useful commands to work with elements inside a window. You can find a more exhaustive listing in the Command Explorer when developing Action logic.
|Enter text in a Windows element||Enters text in a Windows element. Current text can be cleared if needed.|
|Enter encrypted text in Windows element||Enters encrypted text in a secure Windows UI element.|
|Click Windows element||Clicks on Windows element under the current parent.|
|Click (multi) at Windows element coordinates||Performs multiple mouse clicks on Windows element at given coordinate position.|
|Click at Windows element coordinates||Clicks on Windows element at a given coordinate.|
|Set Windows element search area||Sets a defined region relative to a given Windows element as a search area for finding other elements.|
|Set Windows scroll element||Sets a defined Windows element as scroll-element.|
|Context (right) click on Windows element||Context (right) clicks on the Windows element.|
|Get Windows element attribute||Gets the value of an attribute for a Windows element.|
|Get Windows element text||Reads text on a Windows element.|
|Double click on Windows element||Double clicks on a Windows element.|
|Is Windows element exists||Checks if a given Windows element exists.|
|Wait for Windows element||Waits until a given Windows element appears on the Window (up to given timeout).|
|Update Windows Element Property||Updates Windows element's property to the given value.|
|Update Windows Element Ordinal Index||Updates ordinal Index of a given Windows Element. Ordinal index refers to the occurance instance of a repeating element on the screen. Note that the ordinal index starts from 1.|
|Verify Windows element text||Verifies text on a Windows element.|
|Verify Windows Element exists||Verifies if the given Windows element exists. Note this is a verification command and it fails the test execution if the verification fails.|
|Verify Windows Element NOT exists||Verifies if the given Windows UI element NOT exists. Note this is a verification command and it fails the test execution if the verification fails.|
|Verify Windows element attribute||Verifies if a given attribute of a windows element has a particular value. Note this is a verification command and it fails the test execution if the verification fails.|
|Clear text in Windows element||Clears text in a Windows element.|
Please sign in to leave a comment.