0% found this document useful (0 votes)
30 views

Returns The Number of Rows in The Web Table: Row Count

This document describes 5 methods for interacting with web tables: 1. RowCount and ColumnCount return the number of rows and columns in a table. 2. GetCellData returns the text from a specific cell given the row and column. 3. ChildItem returns a test object like an image or text box from a specific cell. 4. GetRowWithCellText searches for and returns the row number containing a cell with matching text. 5. These methods provide ways to programmatically obtain information from and interact with elements in web tables.

Uploaded by

gouthamstrikes
Copyright
© © All Rights Reserved
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
30 views

Returns The Number of Rows in The Web Table: Row Count

This document describes 5 methods for interacting with web tables: 1. RowCount and ColumnCount return the number of rows and columns in a table. 2. GetCellData returns the text from a specific cell given the row and column. 3. ChildItem returns a test object like an image or text box from a specific cell. 4. GetRowWithCellText searches for and returns the row number containing a cell with matching text. 5. These methods provide ways to programmatically obtain information from and interact with elements in web tables.

Uploaded by

gouthamstrikes
Copyright
© © All Rights Reserved
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 3

WEB TABLE METHODS

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

Row Number where the cell is Located


Column Number where the Cell is Located
Name of the Class Eg: Image, Web Edit
Index starts from 0. It is used to specify the Required Element
When there is more then one Object in a cell.

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)

Set Link = Browser ().Page () WebTable ().ChildItem (Row, 2,Link, 0)


Link. Click

You might also like