How to find the objects that don't have unique values?
I want to map the objects from this tree view. The problem I see that their values don't seem to be reliable. See the attached screenshot. I tried the FindChild method, but it sometimes finds the sought-for object and sometimes doesn't.
var microStationFloatingHost = Aliases.OpenRoadsDesigner.HwndSource_WpfMainWindow;
var propNames = new Array ("ClrFullClassName","ChildCount");
var propValues = new Array ("Telerik.Windows.Controls.RadTreeView", 2);
depth = 0;
counter = 1;
var treeView = microStationFloatingHost.FindChild(propNames, propValues, 50, true);
if(counter > 50)
Is there a way to deal with such dialogs?
I have also attached a video that shows the steps I want TestComplete to do automatically.
Re: How to find the objects that don't have unique values?
Instead of childcount try the ordinalcount that is there with the element. So in your case you can find the control first which is the treeview and then use the findchild for it to search using the classname and ordinal number to go to the exact item.