Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Get nativeclass of a tooltip
#1
Solved: 11 Years, 4 Months ago
Hi Ankur,

We need to validate the tooltip text for a Label. The application is client server application. I used the below loc which displays tooltip.

Code:
SwfWindow("Microbiology Result Entry Main").SwfLabel("SwfSuscInterpretation2").MouseMove 5,10

But to validate the tooltip text i need nativeclass. I tried to spy on the tooltip(to get nativeclass) but it disappears in a second. I tried many times. Please let me know if there is any other way to find the nativeclass of tooltip.

Thanks in advance,
Pallavi[/font]
Reply
#2
Solved: 11 Years, 4 Months ago
Hi pallavi,

To validate the tootip text , go to object identification select SwfLabel object ,add the native class property to the Mandatory property field.
Then go to object repository select the add repository icon and add the SwfLabel object from the application ,so the properties are updated for SwfLabel object.

For getting the nativeclass property value of SwfLabel object use GetRoProperty method
Code:
var=SwfWindow("Microbiology Result Entry Main").SwfLabel("SwfSuscInterpretation2").GetRoProperty("nativaclass)
msgbox var

kindly let me know if there is any query...............

Regards
Balakrishnan.N
Reply
#3
Solved: 11 Years, 4 Months ago
Hi Balakrishnan

I dont need the nativeclass of the label. I need to get nativeclass of the tooltip which will display when we move mouse pointer on the Label object.
Please let me know how we can get the nativeclass for a tooltip.

Thanks for the reply,
Pallavi
Reply
#4
Solved: 11 Years, 4 Months ago
tool tip text can be captured by using GetROProperty and capture the "ALT" property of the object.
try msgbox SwfWindow("Microbiology Result Entry Main").SwfLabel("SwfSuscInterpretation2").GetROProperty("ALT")
Hope this will help you.

Reply
#5
Solved: 11 Years, 4 Months ago
Hi Saket,

I tried GetROProperty("ALT"). This is not getting tooltip text. The Value returned is Empty.

Pallavi
Reply
#6
Solved: 11 Years, 4 Months ago
Hi pallavi,

Code:
SwfWindow("Microbiology Result Entry Main").SwfLabel("SwfSuscInterpretation2").MouseMove 5,10

move the mouse over the object ,wait for a second tooltip to appear

Code:
wait(2)
var=SwfWindow("nativeclass:=tooltips_class32").getroproperty("text")
msgbox var
most of the windows application use this nativeclass only "tooltips_class32"
i don't know for .Net application ,move mouse over the object in the application...
use descriptive in the script

kindly let me know , if there is any query

Regards
Bala
Reply
#7
Solved: 11 Years, 4 Months ago
Hi Balakrishnan,

Code:
SwfWindow("nativeclass:=tooltips_class32").getroproperty("text")

It works for only win32 application. This is not working for .net application.

Thanks,
Pallavi
Reply
#8
Solved: 11 Years, 4 Months ago
Hi Pallavi,

using the object spy click on that SwfLabel object , it will show all the Test object properties available for SwfLabel object ,check the tooltip property is available or not
suppose if it is not present in the Test object properties ,select the Runtime object properties and check the tooltip property is available or not, if it is present in that
Code:
var=SwfWindow("Microbiology Result Entry Main").SwfLabel("SwfSuscInterpretation2").GetToProperty("Tooltip")
msgbox var
or
Code:
var=SwfWindow("Microbiology Result Entry Main").SwfLabel("SwfSuscInterpretation2").GetRoProperty("Tooltip")
msgbox var
kindly let me know , if there is any query


Regards
Balakrishnan.N
Reply
#9
Solved: 11 Years, 4 Months ago
Hi Balakrishnan,

Tooltip property is not available for the Label. I checked both Test object and Run time object properties .

Pallavi
Reply
#10
Solved: 11 Years, 4 Months ago
Hi Pallavi,

correct,just now i have checked
These are the Properties available for SwfLabel object
abs_x,abs_y,CanSelect,capture,ContainsFocus,enabled,focused,HasChildren,height,index,is child window,is owned window,IsAccessible,location,LinkBehavior,name,nativeclass,RegExpWndClass,RegExpWndTitle,swfname,swfname path,swftypename,text,visible,width,x,y .

I think there is no Tooltip property for SwfLabel object.

Regards
Bala
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Capture tooltip text through bitmap checkpoint Nicklas 3 4,605 10-09-2012, 07:35 PM
Last Post: Brian.Osborne
  Capturing Tooltip text in firefox using QTP 10.0 sudhab 1 3,031 11-28-2011, 05:16 PM
Last Post: ravi.gajul
  Problem while extracting tooltip! ramyakk 3 3,332 07-18-2008, 07:14 PM
Last Post: anemuday

Forum Jump:


Users browsing this thread: 1 Guest(s)