
In order to identify a node in a tree, eCATT records the node ID. As the node IDs can change over time in some applications, you can also identify tree nodes by their node text.
It is not possible to record tree nodes by their texts. This is not supported by the GUI Scripting API because the texts of tree nodes do not have to be unique.
If you want to access the nodes in a tree control using text paths instead of node IDs, proceed as follows:
Record the tree control in the normal way.
After the recording you usually have many tree control methods and properties in the SAPGUI command.
In the command interface, change the access to the nodes by using the following syntax in the values of the commands:
Syntax:
'/@TTP/ < TextOfNodeOnFirstLevel > /@/ < OccurrenceOfNode > /@/ < TextOfNodeOnSecondLevel > /@/ < OccurrenceOfNode > '
Example:
'/@TTP/ MyNode /@/1/@/ MySubNode/ @/2/@/ MyThirdLevelNode /@/1'
The following table contains the key word description:
|
Key Word |
Description |
|---|---|
|
/@TTP/ |
T ree by T ext P ath Indicates that this node should be addressed with the text path |
|
/@/ |
Separates the entries of the path The numbers define which occurrence of a node text is to be selected. As node texts do not have to be unique, there can be several nodes with the same text on the same level. Therefore you must always define which of these nodes you want to address. |
The following tree control methods/properties support playback by the text path:
selectedNode
doubleClickNode
nodeContextMenu
selectNode
unselectNode
changeCheckbox
clickLink
For each of these methods and properties, the path to the tree node is expanded automatically.
The CSN note 1231706 with the contained correction enhances the solution to the methods doubleClickItem, itemContextMenu and selectItem.