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
#5
Solved: 12 Years, 10 Months, 2 Weeks ago
Hi,
I just tried with ur example still it is taking more time and got the error message of script out of range.

Code:
Dim n(271)
m=Browser("……").Page("……..").Frame("……..").WebTable("……….").RowCount
msgbox m
For i=3 to m-1 step 1
n(i)=Browser("………").Page("……..").Frame("…….").WebTable("…….").GetCellData(i,2)
Call IsAscending (n)
Next
Function IsAscending(n)
'Assign default value of IsAscending
IsAscending = true
For i= 0 to m - 1
If n(i) > n(i+1) Then
'Return value of IsAscending
IsAscending = false
exit for
End If
Next
End Function

Note: The funtion u wrote will validate between the previous value (i) and next value (i+1) which will not validate between i and i+2
EX:
Please find the below list:
amar 1
batchu 2
akbar 3
anand 4
venkat 5
The mentioned function will validate only in between 1 and 2, 2 and 3 , 3 and 4, 4 and 5 this is the way it would proceed it will not compare in between 1 and 3 , 1 and 4 . So with this the function may not fullfill the required scenario.
Can you please let me know if there is better solution aprt from this .
Please let me know if i am going in wrong direction
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, 07:45 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Web page not loading for EBS application when open UFT satyagadam 1 2,237 09-18-2019, 02:30 AM
Last Post: satyagadam
  Facing a problem while identifying Angular JS objects in a web page vangasantosh 0 1,485 12-20-2017, 01:26 PM
Last Post: vangasantosh
  capturing message on web page when caps lock is on helan 0 2,682 04-29-2015, 05:25 AM
Last Post: helan
  IE 11 has stopped working is displayed while running UFT 12 iahmad 0 2,215 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,833 03-24-2014, 12:53 AM
Last Post: supputuri

Forum Jump:


Users browsing this thread: 1 Guest(s)