Get numbers inside all webelements in webtable and sort them

You have a web table having 3 rows and 3 columns. Inside web table all are web elements and 9 numbers(3,1,9,4,7,2,6,5,8) were there inside these web elements. Retrieve all these 9 numbers and sort them.
I have written this below code please check once and let me know anything wrong and if any better solutions for this.
set wb=browser().page().webtable()
rc=wb.rowcounnt
For i = 1 To rc
cc=wb.columncount(i)
For j = 1 To cc
txt=wb.childitem(i,j,"Webelement",0).getroproperty("innertext")
a=a&txt&";"
Next
Next
b=split(a,";")
For i=0 To ubound(b)
For j=0 To ubound(b)
If strcomp(b(i),b(j),1) < 0 Then
temp = b(i)
b(i)=b(j)
b(j)=temp
End If
Next
Next
For i=0 To ubound(b)
msgbox b(i)
Next

Showing Answers 1 - 3 of 3 Answers

lavanya

  • Oct 25th, 2016
 

Set RC=browser().Page().Webtable().rowcount
Set CC=browser().Page().Webtable().Columncount

For i=0 to RC step 1
For j=0 to CC step 1
print a()
Next
Next

Print ASC(a())

Please correct me if anything I missed

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions