Micro Focus QTP (UFT) Forums
Problem while extracting 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: UFT / QTP Beginners (https://www.learnqtp.com/forums/Forum-UFT-QTP-Beginners)
+--- Thread: Problem while extracting tooltip! (/Thread-Problem-while-extracting-tooltip)



Problem while extracting tooltip! - ramyakk - 06-25-2008

Hi All...

I need to take the tooltips from a webpage...
I tried the below script from some previos post...

Code:
Browser("Yahoo!").Page("Yahoo!").WebElement("text:=My Yahoo!").FireEvent "onmouseover"
wait 1
' Grab tooltip
ToolTip = Window("nativeclass:=tooltips_class32").GetROProperty("text")
msgbox ToolTip

I am getting the following error...
Cannot identify the object "[ Window ]" (of class Window). Verify that this object's properties match an object currently displayed in your application.
Line (4):
Code:
"ToolTip = Window("nativeclass:=tooltips_class32").GetROProperty("text")".

I tried using Object spy...but when I am holding the control key , the tooltip was not displaying..

Please suggest what can I do....

Thanks in advance.

Ramya


RE: Problem while extracting tooltip! - surya_7mar - 07-07-2008

You can get the tool tip by getting title property of the Object.

As you said if you want to Get tht Tool Tip of Browser("Yahoo!").Page("Yahoo!").WebElement("text:=My Yahoo!")

You can directly get it using the the stmt Browser("Yahoo!").Page("Yahoo!").WebElement("text:=My Yahoo!").GetROProperty("title")
Let me know if it does not work


RE: Problem while extracting tooltip! - srivenk - 07-16-2008

Hi try this
Code:
Browser("Yahoo!").Page("Yahoo!").Link("My Yahoo").getroproperty("outerhtml")
we will get the outer html tag like <A Title="Go to My Yahoo!,href=........</A>.from this html tag we have to segregare the Output by simple programming...try this let me know if it doenst work.


RE: Problem while extracting tooltip! - anemuday - 07-18-2008

Hi,

Use the "alt" property to know the tooltip.

Here is the sample script:
Code:
str=browser("MSN.com").Page("MSN.com").Image("Deadliest Cars // Crash").GetROProperty("alt")
msgbox(str)
Thanks & Regards,
Uday.