How to detect control that is not listed as child
I am new to TestComplete and trying to get it to identify a Tree style of control inside of a dockable section of our program. TestComplete identifies the panel the tree is in as an explorerPane, but it doesn't identify the tree within at all. That is, the pane is a leaf node in the object tree, there are no children. It seems like what I need to do is some kind of object mapping, but the Object Browser does not show any children of the pane, so I don't know what object I can tell it to map. Is there some way to get it to enumerate everything, even things it does not recognize?
I am also confused about the Object Mapping process, as it says to use the WndClass value for the Object Name, but that value is seemingly the same in Object Browser for everything in the application from the Main Form down.
Attached is an image of the part of the program I'm trying to access, along with the tree for that section from Object Browser.
As an additional note, I've also tried using Text Recognition to identify these items, but that also does not seem to work.
Thanks for the screenshots. It doesn't look like these objects are based on known supported controls, so they need a different approach. There are a few ways to deal with custom controls like these:
1) Usually custom control have a property or method that contains the item data, something like DataSource.Item(index).Text. Data properties may also be named Items, Rows, or similar. For example, on your screenshots, ProjectExplorer has the DataSource and DataBindings properties that look relevant, and explorerPanel has the DataBindings property. Examine these properties in the Object Browser (by clicking the [...] button) to see what data is inside them. Or better yet, if you are in contact with the application developers, ask them which properties and methods you can use to access the tree items.
2) You can try to enable MSAA, UI Automation or Text Recognition for your custom objects. Sometimes this helps TestComplete to identify items as separate objects.
- Go to Tools > Current Project Properties (not Default Project Properties).
- Under Open Applications, select MSAA, UI Automation or Text Recognition (any one of them).
- Add WindowsForms* to the list and select the check box next to it.
- Save your project.
- Refresh the Object Browser.
Hope this helps!