the following code may be generic solution

alpaorder="A,B,C,I,H"
Call funcRetriveandcompare(alpaorder)
Function funcRetriveandcompare(alpaorder)
   'To retrive the values  and create an array
   Dim vtcarr() ' array which has value to be comapred vtcarr()  Construct
an array  which has an order of values to be comapred  i.e. evarr()
   rw=Browser(XX).Page(XX).GetRowCount
   ReDim vtcarr(rw-1) ' assuming that the all the rows you would like to
comapre in the table
 For i =0 to rw-1

  vtcarr(i)=Browser(XX).Page(XX).GetCellData(i,1) ' assuming that column is
constant
 Next
 evarr=Split(alpaorder, ",")
 For j=0 to Ubound(evarr)
 flag=0
 if Strcomp(vtcarr(j) , evarr(j)) >1Then
 flag=1
 Next
 'Update the report  if its failed
  If  flag=1 Then
           Msgbox " failed"
         End If
End Function
Regards,
chethana



On Tue, Aug 23, 2011 at 11:49 AM, gopi nath <[email protected]> wrote:

> Hi,
>
> Case 1: If the list is in WebTable
> rw=Browser(XX).Page(XX).GetRowCount
>
> flag=0
> For i =1 to rw-1
>     val1=Browser(XX).Page(XX).GetCellData(i,1)
>     val2=Browser(XX).Page(XX).GetCellData(i+1,1)
>     If Asc(val1)<Asc(val2) Then
>       flag=1
>     End If
> Next
>
> If flag=1 Then
>   msgbox "List is in alphabatical order"
> End if
>
>
>
>
> On Fri, Aug 19, 2011 at 3:16 AM, Blessy <[email protected]> wrote:
>
>> Hi,
>>
>> Please let me know how to verify that a list is showed in a particular
>> order in qtp.
>>
>> For eg. The sequence in the report should be:
>> A
>> G
>> H
>> J
>>
>> We need to verify thru qtp that the order is appears like above.
>>
>> Thanks,
>> Deepti.
>>
>> --
>> 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
>
>
> --
> 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

-- 
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