Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Sort Order Help
#2
Not Solved
Code:
arrCtry=Split(Browser("name:=QTP").Page("title:=QTP").WebList("name:=select1").GetROProperty("all items"),";")

Set objArray=DotNetFactory.CreateInstance("System.Collections.ArrayList","")

For i=0 to Ubound(arrCtry)
If arrCtry(i)<>"--Choose One--" Then
   objArray.Add(arrCtry(i))
End If
Next

objArray.Sort()

objArray.Insert 0,"--Choose One--"

For j=0 to Ubound(arrCtry)
strOuput=strOuput+objArray(j)
strOuput=strOuput+";"
Next

If strOuput=Browser("name:=QTP").Page("title:=QTP").WebList("name:=select1").GetROProperty("all items")+";" Then
Msgbox "The Weblist's values are sorted in alphabetical order"
Else
Msgbox "The Weblist's values are not sorted in alphabetical order"
End If
Reply


Messages In This Thread
Sort Order Help - by automation2012 - 03-01-2013, 10:59 AM
RE: Sort Order Help - by vinod123 - 03-01-2013, 11:04 AM
RE: Sort Order Help - by automation2012 - 03-01-2013, 11:20 AM
RE: Sort Order Help - by vinod123 - 03-01-2013, 12:54 PM
RE: Sort Order Help - by automation2012 - 03-06-2013, 11:14 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Should I download every patch in order to UFT recognize the Chrome and FireFox browse jesusisaac 6 5,343 08-25-2016, 05:03 PM
Last Post: Ankesh
  Get numbers inside all webelements in webtable and sort them pradeep537 1 2,821 08-04-2016, 01:24 AM
Last Post: Ankur
  Automating SAP Sales Order Dwarak Calayampundi 0 1,718 06-09-2016, 09:28 AM
Last Post: Dwarak Calayampundi
  Sort multidimensional array SBsteven 8 9,041 03-14-2014, 02:49 PM
Last Post: anuj.bajaj
  sort two dimensional array. venkatesh9032 0 1,814 03-06-2014, 02:47 PM
Last Post: venkatesh9032

Forum Jump:


Users browsing this thread: 2 Guest(s)