Forum Discussion
You've written the following code,
targetItem = vlcNetTree.FindChild("(12) Well Test 1", "*", 3)
Where parameters are -
PropNames - A property or an array of properties by which the method will search for an object.
PropValues - A value of a single property or an array of values of properties that the PropNames parameter specifies.
Depth - An integer value that sets the maximum level of the object’s hierarchy that the method will reach while searching for the specified object.
Hint: Using the Object Browser, where is the Property Name of "(12) Well Test 1"? And where is the Property Value of "*"? Refer to the FindChild method examples, and note the parameters
- BD_Geoactive4 days agoOccasional Contributor
The example i throw out there is just an example i want to do not actually what im expecting to work.
I have read the FindChild() article and none of the properties/methods for the treeview im having difficulty with giving me any options to do what i want. Again, the treeview in question is custom drawn components (legacy code) and is pain in back to try to use with automation with T.C
example of what i can see using MS Accessibility Insight vs Test Complete Object Browser is attached. In our previous Framework using selenium > WinAppDriver, i can access these tree items no problem.
I think i can say i cannot access those treeitems under the troubled treeview - anyway i have logged a support case - see what they can advice me to do.
thanks though for your reply
- rraghvani3 days ago
Champion Level 3
For reference, the parameters you have passed into FindChild() method is incorrect. The parameter "(12) Well Test 1" is a Property Value, not a Property Name.
In TC, you might have to enable MSAA (or UI Automation), to expose more UI objects of you application. Ensure your VCL Classes is supported by TC, see https://support.smartbear.com/testcomplete/docs/general-info/supported-technologies/index.html
What does "Panel1" show if you expand it?
You also have .NET method, which you might be able to use to select your item.
- BD_Geoactive3 days agoOccasional Contributor
Panel1 object is the toggle buttons on top of the treeview.
I will try the tips for "For reference, the parameters you have passed into FindChild() method is incorrect. The parameter "(12) Well Test 1" is a Property Value, not a Property Name." very soon - this is the bit I was needing explanation for, I read the doc in T.C site but I'm not programmer minded person.Thanks for you help