Forum Discussion

jmassey's avatar
jmassey
Contributor
9 years ago

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...
  • HKosova's avatar
    HKosova
    9 years ago

    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!