TC UIA Popup Menu
This Module can be used to steer popup menus or context menus already opened in a TestStep that was previously executed. The UIA Engine is used for steering.
For further information on licenses, please contact Tricentis Support. |
The Module TC UIA Popup Menu contains the following attribute:
ModuleAttribute |
Description |
---|---|
Menu Item |
The item to be selected from the context menu. If this is located in a submenu of the context menu, the path of the submenu must be specified. Items must be separated with ->. |
Parameter WaitForDisplay
The parameter WaitForDisplay can be used for the ModuleAttribute Menu Item. The UIA Engine expands menus upon steering and clicks on the last element in the path. Sometimes, the UIA Engine clicks on the element before the menu is expanded and displayed. The WaitForDisplay parameter can be adjusted to prevent this. The value is specified as a span of time (in milliseconds) that defines how long the engine should wait for the menu to expand before performing a click. If no WaitForDisplay parameter has been specified, 300 is used as the default value.
WaitForDisplay parameter
Input
If a path is entered, the specified menu item is selected. The path is specified according to the following syntax:
MenuItem1->MenuItem2->MenuItem3-> etc.
The following operations can be performed:
Value |
Description |
---|---|
{Click(<path>)} |
Performs a left click on the menu item specified in the path. |
{RightClick(<path>)} |
Performs a right click on the menu item specified in the path. |
{DoubleClick(<path>)} |
Performs a double click on the menu item specified in the path. |
Example
The following context menu item is to be selected:
Example - popup menu
Example - input
Verify
Syntax |
Value |
Description |
---|---|---|
.toggleState(<path>) |
On/Off/Indeterminate |
Verifies the status of the menu. |
.itemExists(<path>) |
true/false |
Verifies whether the menu contains an entry with the specified path. All elements down to the menu item specified are expanded. |
.enabled(<path>) |
true/false |
Verifies whether the item under the specified path on the menu is enabled or disabled. All elements down to the specified menu item are expanded. |
Example: .toggleState
In the following example, the system verifies whether a check appears before the menu item Menu bar. This property can only be verified on menus that support TogglePattern.
Example - menu
Example - .toggleState
Example: .itemExists
In the following example, the system verifies whether the menu item Menu bar exists.
Example - .itemExists
Example: .enabled
In the following example, the system verifies whether the menu item Size is disabled.
Example - menu
Example - enabled