Test Complete: How to get the X/Y coordinates of an item in a TreeView control
I am using TestComplete 14.74
I am trying to test a Drag/Drop feature in a TreeView control (implemented in C++/MFC). I can get the position of the TreeView itself but, cannot for the life of me, figure out how to get the X,Y of the tree item that is currently selected.
The Tree is like this and I would want to drag Level 1.1.1 to Level 2.1.1
Top Node
| Level 1
| Level 1.1
| Level 1.1.1
| Level 2.1
| Level 2.1.1
The TreeView control is mapped and aliased
myApp = Aliases.MyApp
sysTree = myApp.MainFrame.ConfigurationManager.SystemViews.TreeView
Thanks in advance
Hi,
You need to get required object (e.g. 'Level 1.1.1') and then use its properties to get X, Y coordinates that you need (usually - .Top, .Left, .Height and .Width ones).
Check if https://support.smartbear.com/testcomplete/docs/reference/test-objects/controls/desktop/win32/tree-view/index.html help article helps.