Controlling an Item
The UI Automation connector implements standard control methods described in Controlling Individual Entities. It also provides additional features for controlling items.
Read the Value of Any Property
The standard get method returns the value of an item:
-
The content of the Value property for EntryFields
-
The content of the Value property of the selected element for ListBox
-
The check state for radio buttons or checkboxes
You can also get the value of any other property of the targeted element. To do this, use the following method:
|
getProperty |
Gets the value of a property of the targeted component |
Example – Get the name of an item
Controlling a Complex Item Using the UI Automation Connector
Using the UI Automation connector, complex items such as trees or lists often have a subtree containing their elements (like in Web).
If you control a complex item by using its subtree, you must manually refresh this subtree after executing actions which changes the item display (scrolling, expand, and so on).
You do this by using the following method:
|
refresh |
Force the item to refresh its subtree |
Example:
-
MyTree to target the Tree
-
MyParentItem to target the parent TreeItem
-
MyChildItem to target the child TreeItem