![]() |
Get nativeclass of a 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: Get nativeclass of a tooltip (/Thread-Get-nativeclass-of-a-tooltip) |
Get nativeclass of a tooltip - Pallavi - 07-17-2009 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] RE: Get nativeclass of a tooltip - balakrish - 07-17-2009 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) kindly let me know if there is any query............... Regards Balakrishnan.N RE: Get nativeclass of a tooltip - Pallavi - 07-17-2009 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 RE: Get nativeclass of a tooltip - Saket - 07-17-2009 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. RE: Get nativeclass of a tooltip - Pallavi - 07-17-2009 Hi Saket, I tried GetROProperty("ALT"). This is not getting tooltip text. The Value returned is Empty. Pallavi RE: Get nativeclass of a tooltip - balakrish - 07-17-2009 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) 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 RE: Get nativeclass of a tooltip - Pallavi - 07-17-2009 Hi Balakrishnan, Code: SwfWindow("nativeclass:=tooltips_class32").getroproperty("text") It works for only win32 application. This is not working for .net application. Thanks, Pallavi RE: Get nativeclass of a tooltip - balakrish - 07-17-2009 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") Code: var=SwfWindow("Microbiology Result Entry Main").SwfLabel("SwfSuscInterpretation2").GetRoProperty("Tooltip") Regards Balakrishnan.N RE: Get nativeclass of a tooltip - Pallavi - 07-17-2009 Hi Balakrishnan, Tooltip property is not available for the Label. I checked both Test object and Run time object properties . Pallavi RE: Get nativeclass of a tooltip - balakrish - 07-17-2009 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 |