Sunday, October 31, 2010

Count no.of Objects in WebTable

Counting the WebCheck Boxes in WebTable.

RC = Browser("Gmail - Inbox (116) -").Page("Gmail - Inbox.*").Frame("c1ayjd6rkr1l78").WebTable("Mega Discounts").RowCount
CC = Browser("Gmail - Inbox (116) -").Page("Gmail - Inbox.*").Frame("c1ayjd6rkr1l78").WebTable("Mega Discounts").ColumnCount(1)
temp = 0
For i=1 to RC
 For j=1 to CC
  Set Chk_Bx = Browser("Gmail - Inbox (116) -").Page("Gmail - Inbox.*").Frame("c1ayjd6rkr1l78").WebTable("Mega Discounts").ChildItem(i,j,"WebCheckBox",0)
  On Error Resume Next
  Validation = Chk_Bx.getroproperty("disabled")
  If (Err.Number=0) Then
   temp=temp+1
   Err.Clear
   On Error GoTo 0
  End If
 Next
Next
print "No. of Checkboxes in the Web Table is " & temp

No comments:

There was an error in this gadget