Micro Focus QTP (UFT) Forums
How to capture Tool tip - Printable Version

+- Micro Focus QTP (UFT) Forums (https://www.learnqtp.com/forums)
+-- Forum: Micro Focus UFT (earlier known as QTP) (https://www.learnqtp.com/forums/Forum-Micro-Focus-UFT-earlier-known-as-QTP)
+--- Forum: VB Scripting/Descriptive Programming (https://www.learnqtp.com/forums/Forum-VB-Scripting-Descriptive-Programming)
+--- Thread: How to capture Tool tip (/Thread-How-to-capture-Tool-tip)



How to capture Tool tip - Rakesh - 01-26-2008

I was facing difficulty in capturing tooltip of the webelement that comes in the webapplication.

I tried up with mousemove but even that is not working.
Kindly suggets some method


RE: How to capture Tool tip - Ankur - 01-27-2008

Check this article 4 Ways to capture Tool tips in UFT

You can also capture the text property from the tooltips_class32 control using using MouseOver method ( for web objects) otherwise MouseMove method.

Code:
' Mouseover
Browser("XXXX").Page("YYYY").Link("Link A").MouseOver
' Wait 1 second to get the tool tip displayed.
wait 1
' Capture the text of the tooltip object
txt= Window("nativeclass:=tooltips_class32").GetROProperty("text")
msgbox txt

[Check the class type if your application use different class for tooltip object, using object spy)


RE: How to capture Tool tip - umar.shariff - 03-01-2008

Hi Ankur

But your code works when i am placing my mouse over the object.Can't we do it dynamically.


RE: How to capture Tool tip - umar.shariff - 03-01-2008

Hi Ankur

Your code works when ever i am placing my mouse over the object.Is there any dynamic way to handle this.


RE: How to capture Tool tip - Ankur - 03-01-2008

what do you mean by "dynamically"?


RE: How to capture Tool tip - Anshoo Arora - 05-11-2008

Have you found a solution yet?


RE: How to capture Tool tip - sreekanth chilam - 05-18-2008

Even you can use the below code:
Code:
ttext=Browser("XXXX").Page("YYYY").Link("Link A").GetROProperty("TooltipText")
msgbox ttext



RE: How to capture Tool tip - skalra - 11-26-2008

wt abt this: GetROProperty("alt") ?


RE: How to capture Tool tip - yugal - 01-02-2009

Hi Ankur,
I need to place my mouse pointer over the link manually to pass the test script, otherwise it doesn't move the mouse pointer automatically to the link. and test fails(gives error)

"Cannot identify the object "[ Window ]" (of class Window). Verify that this object's properties match an object currently displayed in your application."

I am using QTP 9.0 version.

regards,
Yugal