actiTIME web application examples in qtp

1.Check whether the button exists or not. If exists,check whether it is enabled or not.

If enabled,click on that button.

Install actiTIME1.5  into ur system. Add Login now button to the Object Repository.Then write the code in qtp

Set mybutton=browser(“actiTIME – Login”).Page(“actiTIME – Login”).WebButton(“Login now”)
buttonclick mybutton            ‘ function call

Function buttonclick(mybutton)
sstepname=”Button click”
sobjtype=mybutton.ToString    ‘  returns name and type of the object
msgbox sobjtype

bexists=mybutton.Exist(2)

‘ check whether the button exists or not
If bexists Then
smsg=sobjtype&” is exists”
reporter.ReportEvent micPass,sstepname,smsg
else
smsg=sobjtype&”does not exists”
reporter.ReportEvent micFail,sstepname,smsg
exittest
End If

bdisabled=mybutton.GetROProperty(“disabled”)

‘Check whether the button is enabled or not
If disabled=0 Then
smsg=sobjtype&” is enabled”
reporter.ReportEvent micPass,sstepname,smsg
else
smsg=sobjtype&” is disabled”
reporter.ReportEvent micFail,sstepname,smsg
exittest
End If

‘ Click on the button

smsg=”Click on “& sobjtype
reporter.ReportEvent micPass,sstepname,smsg
mybutton.Click

End Function

2.Check whether the edit box exists or not.If exists check whether it is enabled or not.

If enabled ,enter text into it.

In this example we are passing username,pwd and clicking Login button

Add username,pwd and login to the Object Repository.And write the code in qtp
Function login(username,pwd)

Set editbox=browser(“actiTIME – Login”).Page(“actiTIME – Login”).WebEdit(“username”)
msg=editbox.ToString
If editbox.Exist Then
msgbox  msg&”  exists”
If  editbox.GetROProperty(“disabled”)=0 Then
msgbox msg&” enabled”
End If
else
Exittest
End If

Set pwdbox=browser(“actiTIME – Login”).Page(“actiTIME – Login”).WebEdit(“pwd”)
Set button=browser(“actiTIME – Login”).Page(“actiTIME – Login”).WebButton(“Login now”)
editbox.Set username
pwdbox.Set pwd
button.Click

End Function
Call login(“admin”,”manager”)

4 comments to actiTIME web application examples in qtp

  • praveen

    hi,
    i have installed actitime web application. i have qtp 9.2, am not able to identify the objects of actitime..all the objects are treated as a web page…i have web addin enabled…any help would be appreciated….thanks in advance…

  • Please check the below points

    1.Are u using internet explorer
    2.Disable all the unusable plugins at the tool bar in the browser window
    3.Goto tools–Internet Options–settings–
    disable the icon of –Enable Tabbed Browsing
    4.Goto user accounts–Change user account control settings
    –drag the icon to never identify

    Please let me know ur updates after doing this

  • User

    suggest any one system testing scenarios examples in actitime

  • User2

    Hello Admin

    please give me some end to end testing scenarios examples in actitime with prescribed format.

Leave a Reply

 

 

 

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>