Sorry, this is a bug in the Python documentation, the second argument of the function should be the text of the item and not the handle.
See also the sample TreeViewTest in the Ranorex Scripts directory.
Please use the following code:
Code: Select all
TreeViewSelectPath(control, 'level1/level2')
parent = TreeViewGetSelectedItem(control)
child = TreeViewGetChildItem(control, parent)
childText = TreeViewGetItemText(treeView,child)
TreeViewSelectItem(control, childText)
We have corrected the documentation for the next release.
Jenö
Ranorex Support Team