Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How do i ensure that displayed values are in ascending order in a web page
#7
Solved: 11 Years, 3 Months, 2 Weeks ago
To validate all the values u could use bubble sort:
For ex:
Code:
Sub BubbleSort(arr As Variant, Optional numEls As Variant, _
    Optional descending As Boolean)

    Dim value As Variant
    Dim index As Long
    Dim firstItem As Long
    Dim indexLimit As Long, lastSwap As Long

    ' account for optional arguments
    If IsMissing(numEls) Then numEls = UBound(arr)
    firstItem = LBound(arr)
    lastSwap = numEls

    Do
        indexLimit = lastSwap - 1
        lastSwap = 0
        For index = firstItem To indexLimit
            value = arr(index)
            If (value > arr(index + 1)) Xor descending Then
                ' if the items are not in order, swap them
                arr(index) = arr(index + 1)
                arr(index + 1) = value
                lastSwap = index
            End If
        Next
    Loop While lastSwap
End Sub
Reply


Messages In This Thread
RE: How do i ensure that displayed values are in ascending order in a web page - by venkatbatchu - 08-04-2009, 02:00 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Web page not loading for EBS application when open UFT satyagadam 1 1,764 09-18-2019, 02:30 AM
Last Post: satyagadam
  Facing a problem while identifying Angular JS objects in a web page vangasantosh 0 1,222 12-20-2017, 01:26 PM
Last Post: vangasantosh
  capturing message on web page when caps lock is on helan 0 2,375 04-29-2015, 05:25 AM
Last Post: helan
  IE 11 has stopped working is displayed while running UFT 12 iahmad 0 1,930 04-06-2015, 06:44 PM
Last Post: iahmad
  qtp 11, Unable to prove the disappearance ofdynamic objects displayed on same screen. priyaang 1 2,447 03-24-2014, 12:53 AM
Last Post: supputuri

Forum Jump:


Users browsing this thread: 1 Guest(s)