To access items in a SAP GUI GuiTree object, most methods need a key which identifies the node. To get such a key, you need the function findNodeKeyByPath()
. The description says:
Return the node key for the given path (e.g. 2\1\2).
path The node path. STRING.
I need to get the first child of the first item in the tree. Using "0"
throws an exception. Indexes of the root element seem to start at 1 instead of 0. Using "1"
and "2"
gives me correct keys.
But anything I try with a backslash does not work. "1\0"
does not throw an exception, neither does "1\1"
. But both parameters return the key of node "1"
and not of a subnode.
How do I need to construct the path in SilkTest (Silk4J, SAP) to get a valid key?