WebTable Methods with Example
ChildObjects:
It Returns either all or the specified categories of Chilobjects present in the parent object. If no description is specified, it returns all childobjects present in the parent object.
Ex:
Set
ObjBr=Browser("title:=Google.*").Page("title:=Google.*")
Set
ChlObj=ObjBr.ChildObjects()
msgbox
ChlObj.count
Ex:
Set Obj=Description.Create
Obj("micclass").value="WebTable"
Set
ObjBr=Browser("title:=.*Google.*").Page("title:=.*Google.*")
Set
ChlObj=ObjBr.ChildObjects(Obj)
msgbox
ChlObj.count
For
i=1 to ChlObj.Count
msgbox
i&" "&ChlObjl(i).GetRoProperty("name")
Next
ChildItem:
It returns an object from a web table based on the
specified row number, column number, micclass value and index.
Ex:
Set ChldItm=Browser("title:=.*Google.*").Page("title:=.*Google.*").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:
Ex:
Set ChldItm=Browser("title:=.*Google.*").Page("title:=.*Google.*").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:
It counts number of specified categories of child items present in a specified cell.
Ex:
ChldItmCnt= Browser("title:=.*Google.*").Page("title:=.*Google.*").WebTable("html
tag:=TABLE").ChildItemCount(2,1,"WebCheckBox")
MsgboxChldItmCnt
GetCellData:
Returns the text contained in the specified cell.
Ex:
CellData = Browser("Browser").Page("Page").WebTable("html
tag:=TABLE").GetCellData(1,1)
MsgboxCellData
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")
Comments
Post a Comment