Posts: 7
Threads: 4
Joined: May 2009
Reputation:
0
10-08-2009, 08:59 AM
Hi,
I want to check if a tool tip exists for a specific object and retrieve the text of the same. I use VBscripting in Qtp. plz help if anyone knows the answer.. Thanks in advance. ...
Regards,
Sreedevi.
Posts: 7
Threads: 4
Joined: May 2009
Reputation:
0
10-08-2009, 10:54 AM
HI Saket,
Thanks for ur quick reply..
However, i want to know if we can move the mouse over the specific objects on the screen using VBScript. This is because the code above can be used when the mouse is placed over the object required. Manaul interference is needed for the above code... Plz help in case if have answer..
Regards,
Sreedevi.
Posts: 1,003
Threads: 1
Joined: Jul 2009
Reputation:
5
10-08-2009, 11:41 AM
Saket's suggestion should work if the application you are working is a Web Based. Else it doesnt make a difference.
If you are working on something for which you know the co-ordinates of the object then you can exploit user32.dll to get a method called SetCursorPos to the co-ordinate and then use
Code:
tooltip = Window("nativeclass:=tooltips_class32").GetROProperty("text")
msgbox tooltip
I have posted the solution on this forum several times. Search using SetCursorPos and you will get the solution.
Basanth
Give a fish to a man and you feed him for a day..Teach a man how to fish and you feed him for life.