Returns The Number of Rows in The Web Table: Row Count
Returns The Number of Rows in The Web Table: Row Count
1. Row Count :
Returns the number of Rows in the Web Table
Syntax: Object.RowCount
Example:
RowCount = Browser (BrowserName).Page (pageName).WebTable ().RowCount ()
***********************************************************************
*
2. Column Count :
Returns the number of Columns in the Web Table
Syntax: Object.ColumnCount
Example:
ColCount = Browser (BrowserName).Page (pageName).WebTable ().ColumnCount
(Row)
***********************************************************************
*
3. GetCellData :
Returns the Text for a Specified Cell
Syntax: Object.GetCellData (Row, Column)
Example:
To get the value in 4th Row and 5th Column
Dim CelValue
Set CelValue = Browser(BrowserName).Page(pageName).WebTable ().GetCellData (4, 5)
MsgBox CelValue
***********************************************************************
*
4. ChildItem Method :
Returns a Test Object from the cell by Type and Index
Syntax : Object.ChildItem (Row, Column, MicClass, Index)
Row
Column
MicClass
Index
Example:
To set the First Edit Box in the Cell and 5th Row, 4th Column in the Web Table
Table1 to Welcome
Dim WebEdit
Set WebEdit = Browser ().Page ().WebTable ().ChildItem (5, 4,WebEdit, 0)
WebEdit.Set Welcome
***********************************************************************
*
5. GetRowWithCellText Method :
Returns the Number of first row found that contains a cell with the Specified Text
Syntax: Object.GetRowWithCellText (Text, [Column],[StartFromRow])
Text The Text String for which to Search
StartFromRow The Number of the Row in which to start the Search.
Example:
To Find a Cell with Specified Text and Click it
Row=Browser (BrowserName).Page(pageName).WebTable(). GetRowWithCellText (XXX, 2, 2)