UFT ContentControl Objects & hovering data capture

Hi, I'm trying to automate a check for an application that I do everyday. The check is to hover over 4 buttons, as I hover over each one, it will show either a box containing a green tick with the applications latency to a server it is connected too(a pass for the test is all the boxes being green).

The problem is that I can't capture the boxs that appear when I hover over each button, as when I move the mouse over to them, they dissapear due to the mouse no longer being over the button.


I can capture the buttons using the object spy, and they are objects of type "ContentControl".


Is there a way I can capture the data provided in the boxes that appear when I hover over these buttons? It would be great if i could get the boxes that appear when I hover over the button into the object repository, as performing the test on them would be qutie easy.


Note: I cannot check the data stream that feeds the boxes.

  • Hello,


    I think that what you are trying to do would be easier to achieve using descriptive programming, instead of the Object Repository feature.

    Descriptive programming along with the inspect element feature of the browser can prove to be very useful in some cases.

    The inspect element feature is more helpful than the Object Spy (in this case) because it allow you to see exactly what happens in the html code when you hover over the button : the boxes that appear might be represented by new lines of code that are inserted only when you hover over the button or they might already exist in the code and become visible when performing the same action. In any case you should be able to see the properties of the boxes and then use descriptive programming in UFT to identify them.


    Hope this helps.



  • Hi,


    I'm afraid I forgot to mention that this is not a browser application.


    When I am in UFT and record macros it records it as

    WpfWindow("appname").WpfObject("objectname"). etc etc

    As such I don't have access to an inspect element feature.

  • I see.

    For browser applications there is another way to capture the properties of web elements in these sort of situations. Maybe I should have started with this. Not sure, however, if it will work for your application.

    When using the Object Spy hold down the CTRL key, hover over the button until the box appears and then release the CTRL key. The box should remain visible and you will be able to spy its properties.


    Hope this helps!



  • Try this.

    Msgbox WpfWindow("Window").WpfObject("Object").Object.Tooltip

Reply Children