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
#6
Solved: 11 Years, 3 Months, 2 Weeks ago
Yes you are right venkat, the function will validate only in between 1 and 2, 2 and 3 and so on. but the function is designed in the same way only that if the first comparison fails then it determines that the array is not in order. say n(1) = 5, n(2) = 6, n(3) = 4 then as statement in the function
Code:
If n(i) > n(i+1) Then
'Return value of IsAscending
IsAscending = false
exit for
End If
if n(1) > n(2) then ie 5 > 6 (will return false)
and conciders the two is in order again
if n(2) >n(3) ie 6 > 4 (will return true)
which is not in order and so the function will return false
and it can be determined that the array is not in ascending order.
As per my knowledge, I dont think the logic is wrong anywhere, let me know if I am wrong somewhere.

Regarding time, I think the way you have written statement is causing the issue. the function call 'IsAscending (n)' should be out of the for loop. Idea is first get all the cell values into array then compare.

Reply


Messages In This Thread
RE: How do i ensure that displayed values are in ascending order in a web page - by Saket - 08-04-2009, 10:59 AM

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,931 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: 2 Guest(s)