Archive for March 21, 2009

ActionTemplate

If you wanna create ActionTemplate, so follow below steps.

 

Step 1: open a Text document & give the required test script header contents as given below

 ‘**************************************************************

‘PROJECT NAME                                       :

‘CURRENT VERSION                                :

‘SCRIPT NAME                                           :  

‘DESCRIPTION                                           :  

‘PRE – CONDITIONS                                :

‘INPUT DATA SHEET/FILE                      :

‘FEATURES TO BE TESTED                      :

‘REUSABLE ACTIONS USED                   :                             

‘REUSABLE FUNCTIONS USED             :

 ‘CREATED DATE                                        :

‘AUTHOR/TEAM                                       :

‘’*************************************************************

‘REVIEW HISTORY                                    :

‘’*************************************************************

‘REVIEWED BY                                           :

‘REVIEWED ON                                          :

‘LAST MODIFIED DATE                           :        

‘’*************************************************************

Step 2: Save the file as “ActionTemplate.mst” & choose “All files” under “Save As Type” dropdown list in the “Dat” folder as given in below path.

          C:\Program Files\Mercury Interactive\QTP\Dat

 

Now onwards whenever we create “new test” in qtp then automatically/implicitly the above test script header will added to the test script.

thanks & regards,

Baba Fakruddin.D

March 21, 2009 at 7:26 am Leave a comment

ChildObjects

ChildObjects:Returns the collection of child objects contained within the object.

ChildObjects returns similar type of objects which matches with the properties given in Description of Object… under the parent object

e.g. on google.com,
‘systemutil.Run “www.google.com”
clas=inputbox(“Enter your object class”,”Object Class”,”Link”)msgbox clas

Dim obj
Set obj=description.Create
obj(“micclass”).value=clas
set co=browser(“Google”).Page(“Google”).ChildObjects(obj)
msgbox co.count
For i=0 to co.count-1 If (clas=”Link”) Then val=co(i).getroproperty(“text”) print val End If
If (clas=”WebEdit”) Then val=co(i).getroproperty(“html tag”) attext=co(i).getroproperty(“attached text”) print attext print val End If
If (clas=”WebButton”) Then val=co(i).getroproperty(“name”) print val End If
If (clas=”WebRadioGroup”) Then val=co(i).getroproperty(“all items”) print val End IfNext

Thanks & Regards
Baba Fakruddin.D

March 21, 2009 at 7:16 am Leave a comment


March 2009
M T W T F S S
 1
2345678
9101112131415
16171819202122
23242526272829
3031  

Recent Posts

Top Clicks

  • None

Pages

Blog Stats

  • 760 hits

Archives