Micro Focus QTP (UFT) Forums
How to validate contents of tooltip - 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 validate contents of tooltip (/Thread-How-to-validate-contents-of-tooltip)



How to validate contents of tooltip - zaira_p - 07-14-2009

Hello everybody,

I have to validate there is text in a tooltip. I am using firefox not IE.

I have tried:
Code:
Tooltip = browser("x").Page("y").WebElement("z").GetROProperty("title")
but it is empty

Any ideas?


RE: How to validate contents of tooltip - Ankur - 07-14-2009

QTP only provides replay support for Firefox(FF). You can record a statement on IE or spy it to find out which property holds the tool tip. Once done you can then run the same script on FF.


RE: How to validate contents of tooltip - zaira_p - 07-15-2009

Thank you I'll check with IE first then


RE: How to validate contents of tooltip - sreekanth chilam - 07-15-2009

Hi Laura,

Proceed as Ankur suggested.

Use the below properties accordingly while retrieving the ToolTip Text.

WebElement --> Innertext/Title
Image --> Alt
Link --> Title


See the below examples:
Ex1:
Code:
msgbox Browser("Yahoo! India").Page("Yahoo! India").Image("Click here").GetROProperty("alt")

Ex2:
Code:
msgbox browser("Google").Page("Google").WebElement("India").Object.title