Wednesday, 5 October 2016

WebTable in UFT/QTP

WebTable in UFT/QTP.

In HTML, Tables are plays a vital role to align the objects in proper order.


In UFT/QTP We have WebTable Methods to handle them.


 Every web table contains data (text data) and child objects in specified cells. When we are working with descriptive programming using UFT/QTP, web table object is very useful to get data or to get object information for further activities.






Below is the sample code snippet.


syntax:-


set Obj_WebTable=Browser(.browername).Page(pagename).WebTable(Tableobject)


To get RowCount from WebTable


syntax:- Rcount=Obj_WebTable.
RowCount

To get columncount from WebTable


syntax:- Ccount=Obj_WebTable.
ColumnCount(row)

To Get Text from the cell in WebTable


syntax:- str_text=Obj_WebTable.
GetCellText(Row,column)R

To Get row number with celltext in WebTable


syntax:- r=Obj_WebTable.
GetRowwithcelltext(string)

To Access total child object from Web Table


syntax:-Obj_WebTable.
ChildObjects(Description)

 to access child objects from a web table cell in web table object without using description object.a


Syntax:- Obj_WebTable.
ChildItem (RowColumnMicClassIndex)

To get Child item count from the web table.


Syntax:- Obj_WebTable.
ChildItemcount(Row,Column,MicClass)

No comments:

Post a Comment