QTP version 8.2
Addins - JAVA, Web, & VB
Have searched this website, Mercury KB and Googled with little success.
My problem is I have a windows screen (see attachment) which has a row of icons on a toolbar. MQTP is treating them as one object (ie: WINTOOLBAR) and when it is clicked - selects the middle icon. We want to select the 2nd icon.
I have attached the window screen, and the repository definition. The window moves around the screen so can't use a fixed location to recognise the object.
We have tried using an index, but that made no difference. Does anyone have any ideas?
Have you tried defining the individual buttons as virtual objects?
In QTP 9.1 it is in my tools menu, I don't recall how it was for version 8.2, but I am pretty sure the functionality existed in 8.2.
What you do is define a rectangular area of the screen (the QTP virtual object tool provides the functionality to do this) and assign that area to work like any object (in your case, assign it to work like a button).
If it works like I hope it will, QTP will recognize this button as a child (virtual) button of the wintoolbar object, so the virtual button will work no matter where your toolbar moves on the screen.
Then again, it might not work at all, but seems worth a shot.
Blake - we tried recording it as a virtual object - but when we record the actual script its not recognising it as the virual object. I'm going to try another few options with it, but nothing I've tried so far works.
thanks for the suggestion though.
Tarun - only one toolbar is defined. What was interesting is that it recorded the button with some very funny characters (unreadable). We've played around with it a bit - but can't find anything to convert it to a 'normal' character set. I tried including them in this post - but they came up completely different again. They look like characters I get when I use a font my pc doesn't like.
I've raised a SR with Mercury, but so far their response was to read a KB that was not relevant.
Do you have any idea what the funny characters are, or how I can decipher them? Each time I record I get a different set.
Still no luck getting this to work. Another related question though. When the mouse hovers over the toolbar icons - different labels appear for each icon. Is there anyway to use this to identify the individual icons?