Saturday 26 July 2014

ToolTip Validation Using QTP

                 Hi friends now a days all of the clients are giving much priority for application Usability, Nothing but usability testing. In the part of usability testing we need to validate Tool Tips of AUT/SUT. Earlier days we did this Tool Tip Validation manually only. But now we can perform that task using automation tools like QTP/UFT.      

               So for that i would like to show different ways


Way 1:=
browser("title:=.*").page("title:=.*").webelement("Xpath:=.*").mouseover
Var=window("nativeclass:=tooltips_class32").GetROProperty("text")
MsgBox Var

Way 2:=
browser("title:=.*").page("title:=.*").webelement("Xpath:=.//*[@id='hplogo']").FireEvent"onmouseover"
Var=window("nativeclass:=tooltips_class32").GetROProperty("text")
MsgBox var

           I think you may know the above syntax to capture Tool Tips. But while executing the test we need to arrange mouse over on the required test object manually, Then only QTP can read the Tool Tip.


Way 3:=          
var =browser("title:=.*").page("title:=.*").webelement("Xpath:=.//*[@id='hplogo']").Object.title
MsgBox Var

The above code also can read the Tool Tips of some test objects some times only. 
       
         But The below code can work on any test object any time, With out any human interception while executing script. 

Way 4:=

 Setting.webpackage("replaytype")=2
browser("title:=.*").page("title:=.*").webelement("Xpath:=.//*[@id='hplogo']").FireEvent"onmouseover"
Var=window("nativeclass:=tooltips_class32").GetROProperty("text")
MsgBox var
Setting.webpackage("replaytype")=1

  

Any Doubts or any issues leave a comment...! 

1 comment:

  1. This comment has been removed by a blog administrator.

    ReplyDelete