Highlighted
Respected Contributor.
Respected Contributor.
291 views

Dealing with MFC Controls

Hi,

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.

Thanks

0 Likes
1 Reply
Highlighted
Frequent Contributor.
Frequent Contributor.

Re: Dealing with MFC Controls

Hi,

 

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.

 

Thanks 

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.