Dealing with MFC Controls
I'm quite new to UFT/QTP and am performing a proof of concept using it on a client/server app that is using MFC controls. Using the spy it is able to see things on a very high level - for example, it can identify a menu bar but none of the menu items or a 'winobject' but nothing in the tree view that lives in it. Attempts to locate children objects through code have failed (for me, as I said I'm new to UFT and haven't touched vbscript before a couple weeks ago).
My question is, what is the advised method for when UFT identifies a 'large' component in a general way (winobject for example)? Is there a way to dig down into the object properties via code? Or is there a way to get UFT to 'learn' what a previously unrecognized object might be?
I know this is pretty vague and my apologies, I'm just kind of looking for an idea on a direction to try or even if there is a direction to try.
Re: Dealing with MFC Controls
if you are using UFT 12.53 and later, load the UIAutomation add-in and try with it.
When you open Object Spy, you need to click on the down arrow next to the hand pointer and choose "UI Automation" mode(see the attached screenshot).
After that spy on the complex controls and see if it helps.
Alternatively, you can use "Insight" recording mode. Start recording a new test, from the Recording toolbar change the mode from Default to Insight Recording. This will record images and add them to the Object repository as well.