Version : QTP 9.2
Application : Web
I am unable to retrieve the contents of cells from a WebTable using 'GetCellData' method.
I am able to take the row count and column count and also i am able to find the row number of a particular text using 'GetRowWithCellText' method.
Could you please help me in reading the cell values from the table?
Are you getting any Error while using GetCellData method? Are you pointing to the correct row and column?
There might be some edit boxes hidden in the cells. If it is so, GetCellData will not work.
Try to check if there is a child object of webedit class in the webtable by using child item method and then by using text or innertext property by creating an object, you can retreive the value.
You may have to change the index value 0 given the example code to 1 or 2 depending on the other editboxes you have in the page.
Set WebEditObj = Browser("Mercury Tours").Page("Method of Payment").WebTable("FirstName").ChildItem(8, 2, "WebEdit", 0)
x= WebEditObj.GetRoProperty "innertext"
X is the text inside the cell.
Thanks a lot for your suggestions.
QTP just gives blank value and no error messages.
There are no WebEdit objects in the WebTable. QTP returns '0' when trying 'ChildItemCount(1,1,"WebEdit")' mehtod. Also when trying to create WebEdit objects, QTP throws "Object required" error message.
hey Venkat change the Column value as Zero and try.
take a look on below URL
i have never seen bugs sleeping
Thanks a lot for your suggestions once again.
I found the hidden WebEdits in the webtable and now able to retrieve the values from the Webtable. I used the following code...
Set WebEditObj = Browser(x).Page(y).WebTable(z).ChildObjects (WebEdit)
For i = 1 To WebEditObjCount-1
WebEditObjVaslue = WebEditObj(i).GetROProperty("text")