Updated code..

 For i =1 to TableRowcount -1
 dtmCurrRow  = TableObject.GetcellData(i,<Column>)
 dtmNextRow  =  = TableObject.GetcellData(i+1,<Column>)
       If  NOT cdate(dtmCurrRow) <=  cdate(dtmNextRow) Then
               Flage = 1
               Exit For
       End If
End

If Flage <> 1 than
  Result Pass
Else
 Result Fail
End if

Let me know if you have query..

Thanks


On Jun 22, 4:53 pm, jaimin <[email protected]> wrote:
> 1. Click on Date column which sort the date in ascending order.
> 2. Get first row and second row date value form Date column
> 3. Check first row date should be less than or equal to second row
> date.
> 4. Get second row and third row date value.
> 5. Check second row date should be less than or equal to third row
> date value.
> 6. Same way check untill end of row using For Loop.
> 7. In the case if you got false result while comparison two row you
> need to break the for loop and show the fail result......
>
>  For i =1 to TableRowcount -1
>   GET CurrRow  = TableObject.GetcellData(i,<Column>)
>   GET NextRow  =  = TableObject.GetcellData(i+1,<Column>)
> If  cstr(sCompareVal) >  cstr(sNextCompareVal) Then
>                 sFlage = 1
>                 Exit For
>         End If
>
>   End
>
> Thanks & Regards,
> Jaimin Shah.
>
> On Jun 22, 3:35 pm, lokesh vinu <[email protected]> wrote:
>
>
>
>
>
>
>
> > Hi All,
>
> > I'm trying to validate the sorting order of in webtable.I need to verify the
> > column, is sorted in descending order.
> > Have anyone faced similar kind of scenario. Please let me know how to work
> > on this.
> > Note: The columns fields are DATE
> > Thanks in advance.
>
> > Lokesh K

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