Hi ,


   I need  a small help from all of you .Please see the scenario description
and advice me the best.



  Iam working with people soft application and I need to automate a module
called Transanction fee.In the application lay out I need to find out the
Transaction fee for all the descriptions which I used to pass from the
excell sheet.coming to the actual issue the Transacion  Fee is 3rd column in
the Webtable called "payment ID" and the "Description"s the second column in
the same table and the table row count is dynamic.I need to find out the all
unique  transaction fee entries from the application and need to export to
excell with the respected Description applicability.please see the part of
the script which I developed so far followed with my Queries seeking the
solution from you.



/*Call to the function

Call getTransFeeItems



/*function to retrieve the transfee

Public function getTransFeeItems()

   Dim gridRowc,transFee,transArray



/*Descriptive methodology to identify the grid

  Set  objBrow= description.Create()

  objBrow("name").value="Transaction Fee"

Set  objPage= description.Create()

objPage("title").value="Transaction Fee"

Set  objPSFrame= description.Create()

 objPSFrame("title").value="Transaction Fee Component"

Set  paymentIDGrid= description.Create()

paymentIDGrid("class").value="PSLEVEL2GRID"



  /*gets Row
Count'gridRowc=browser(objBrow).page(objPage).PSFrame(objPSFrame).webTable(paymentIDGrid).RowCount

/*Testing the loop for the row from 2 to 7

  For i=2 to 7

   For j=3 to 3

/*retrieving the child items for the particular cell as the Transaction fee
is a dropdown box in the cell

' count1=
browser(objBrow).page(objPage).PSFrame(objPSFrame).webTable(paymentIDGrid).ChildItemCount(i,j,"WebList")

/*Count is always one as every time there is only one childitem in
each cell


   'msgbox count1

/*Retriving the required listbox to webList

set webLis=
browser(objBrow).page(objPage).PSFrame(objPSFrame).webTable(paymentIDGrid).ChildItem(i,j,"WebList",0)

/*Now default value of list box is in cell data say “credit card fraud fee”

cellData=webLis.getroproperty("default value")

                cellData=Trim(cellData)



/* Initiating the dynamic arraylist to dump all the transfees.

Set transFeeItems=createobject("System.Collections.ArrayList")



/*For the first row the transfee is added to arraylist

If cint(i)=2 Then

                transFeeItems.add cellData

                msgbox transFeeItems(0)

End If

/*Loop follows to add the unique transfee to the list

                For each strItem in transFeeItems

                                If strcomp(cellData,strItem)<>0 Then


transFeeItems.add
cellData



                                End If

                Next

                Next

                  Next



/*Now the arrayList contains all the unique Transfees.

                  For each strItem in transFeeItems

                                  msgbox strItem



                  Next

/*adding the perameter to excel at run time as Transfee as a column

                 datatable.GetSheet(sheetName).AddParameter  "TransFee",”’



End Function



Here the Question is the above code is working fine but with the performance
issues

QTP is taking the so much of time inorder to execute the above function and
most of the wastage is to finding out the Transfee from the each cell.

Please let me know is there any other solution which QTP can quickly
recognize the cell datas and the comparision algorithem.



The second one is I need to add the identified Transfee as the separate
perameter in the excel sheet with the respected description applicable or
not .



Pleae see the expected format of out put:

Description

Transfee1

Transfee2

Transfee3

Transfee4

Transfee5

Transfee6

Agency car

Yes

No

Yes

No

yes

No

Agency air

Yes

No

NO

NO

NO

NO

Marchent Hotel

Yes

NO

NO

NO

No

No





The above description is passed through external excel sheet and the
respected Transfee needs to be exported each time the script.



I really   appreciate your patience to read the above description and it
would be very helpful if any one can sugest the optimal algorithem for above
.Due to few reasons not able to attach the screen shots.



Thanks,
Srinadh.neelam,
Half knowledge is more dangerous...

-- 
You received this message because you are subscribed to the Google
"QTP - HP Quick Test Professional - Automated Software Testing"
group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/MercuryQTP?hl=en

Reply via email to