Micro Focus QTP (UFT) Forums

Full Version: How to validate contents of tooltip
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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?
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.
Thank you I'll check with IE first then
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