03-26-2013, 02:54 PM
Code:
Set oDesc=Description.Create()
oDesc("micclass").value = "WebElement"
oDesc("class").Value = "order_details_main_boxes"
Set sLinks = Browser("Browser").Page("Page").ChildObjects(oDesc)
sLinkCount = sLinks.Count
PRINT "sLinkCount " &sLinkCount
For i = 0 to sLinkCount - 1
iName= sLinks(i).GetROProperty("innertext")
iOrderNumber =Left(iName, 7)
iDate = Right(Left(iName, 20), 10)
aSort(i) = iOrderNumber
PRINT "AppSort "&aSort(i)
Next
Public Function fnSort()
For j = 0 To sLinkCount - 1
For k = j + 1 To sLinkCount - 1
If aSort(j) > aSort(k) Then
sTemp = aSort(j)
aSort(j) = aSort(k)
aSort(k) = sTemp
End If
Next
Next
End Function
fnSort()
For j=sLinkCount - 1 to 0 Step - 1
sDescArr(j) = aSort(j)
PRINT "sDesc " &sDescArr(j)
Next
fnSort()
For j=0 to sLinkCount - 1
sAscArr(j) = aSort(j)
PRINT "sAsc " &sAscArr(j)
Next
I have got the code to check the sort logic but failed to check the validation....
need some help in this regard....i need to compare application order sort and the sort which i got from the logic i used above....