Web Table Object: all Methods and Properties in Web Table?

TestingQ.com     03:46    

WebTable Object is a table Containing a variable number of rows and columns.

ChildItem
Returns a test object from the cell by type and index 
Ex: 
Set ChldItm = Browser("Browser").Page("Page").WebTable("html
tag:=TABLE").ChildItem(2,1,"WebCheckBox",0)
ChldItm.Click
'we have to pass row number, column number, Object type and Index(optional)

ChildItemCount
Returns the count of objects of a specific type in the specified cell. 
Ex:
ChldItmCnt=Browser("Browser").Page("Page").WebTable("html
tag:=TABLE").ChildItemCount(2,1,"WebCheckBox")
Msgbox ChldItmCnt

ChildObjects
Returns the collecton of Child Objects Contained within the Object. 
Ex: 
Set ChldObj =  Browser("Browser").Page("Page").WebTable("html
tag:=TABLE").ChildObjects
Msgbox  ChldObj.Count

For i=1 to  ChldObj.Count
msgbox i&" "& ChldObj(i).GetRoProperty("name")
Next

RowCount
Returns the number of rows in the table.
RC=Browser("Browser").Page("Page").WebTable("html tag:=TABLE").RowCount
Msgbox RC

ColumnCount
Returns the number of column in the table.
Ex:
ColCnt = Browser("Browser").Page("Page").WebTable("html
tag:=TABLE").ColumnCount(2)
Msgbox ColCnt
Note: we need to pass rownumber to know the column count

GetCellData
Returns the text contained in the specified cell.
Ex:
CellData = Browser("Browser").Page("Page").WebTable("html
tag:=TABLE").GetCellData(1,1)
Msgbox CellData

GetRowWithCellText
Returns the number of the first row found that contains a cell with the specified text. 
Ex:
Msgbox Browser("Browser").Page("Page").WebTable("html
tag:=TABLE").GetRowWithCellText("Hello")
To receive daily posted JOBS & Interview Questions
Just enter your email address below and click 'Submit'
Enter your email address:

Make sure to activate your subscription by clicking on the activation link sent to your email

Join Infolinks

Get Latest Updates By Email

Recent Posts

Company

FAQ's

Blogroll

Subscribe to Newsletter

We'll never share your Email address.
© 2015 TestingQ.com. Blogger Templates Designed by Bloggertheme9. Powered by Blogger.