Forum Discussion

dvox's avatar
dvox
Occasional Contributor
16 years ago

UI objects not recognized

Hi,



I am currently working on using TC8 to create automation scripts for our inhouse windows applications. Our windows applications for the majority part use custom controls(can just say a bunch of pixels used to create them). We have written functionality behind them. 



Is there any way to expose these controls for TComplete to view them to generate scripts for testing? I have added WindowsForms*, UI*, UIHwnd * to the MSAA and UI Autoamtion in the properties menu. But all the custom controls are not visible in the object browser.



Would appreciate some suggestions to take my scripts forward. I am attaching a screenshot of the app as viewed in the object browser.



Thanks

Kanth

3 Replies

  • Hi,



    Since your application is a .NET application, you don't need to use MSAA or UI Automation. TC has access to all .NET objects, properties and methods by default. If, after disabling MSAA and UIA, you don't see your target objects in the tree, this means that your application doesn't expose them as individual controls, and you need to access them via native properties and methods of their parents.
  • dvox's avatar
    dvox
    Occasional Contributor
    Hi Jared,



    Thank you for the prompt response.

    As you suggested I removed the UIA and MSAA from and none of the objects are being exposed to TC. So I have to access them via native properties. But how to go about achieving that? Would appreciate any pointers or examples. 



    Thank you

    Kanth
  • Hi Kanth,



    You need to look at the parent of your target objects in the Object Browser and check what properties it provides (enable the Advanced mode before doing this - see the "Basic and Advanced View Modes" help topic). You need the properties in the .NET group.

    Among these properties, find those that provide access to the target objects. Most probably, there will be a property which holds an array where you can find the objects you need.

    In general, you can use the properties and methods you would use inside your application.