Micro Focus QTP (UFT) Forums
Retrieve row number from web table - Printable Version

+- Micro Focus QTP (UFT) Forums (https://www.learnqtp.com/forums)
+-- Forum: Micro Focus UFT (earlier known as QTP) (https://www.learnqtp.com/forums/Forum-Micro-Focus-UFT-earlier-known-as-QTP)
+--- Forum: UFT / QTP Others (https://www.learnqtp.com/forums/Forum-UFT-QTP-Others)
+--- Thread: Retrieve row number from web table (/Thread-Retrieve-row-number-from-web-table)



Retrieve row number from web table - amilar - 11-24-2008

Hi All,

I have a problem in retrieving row number from data table. I want to get the row no for specific data.

Code:
row= Browser(":: Cesar").Page(":: Cesar").Frame("frm_spnGrid").WebTable("1").GetRowWithCellText ("BAH-05:00-QTP")
msgbox row

BAH-05:00-QTP -
SHJ-BAH-05:00-QTP

when this code line execute, it gives wrong row no. it gives row number for the SHJ-BAH-05:00-QTP. I don’t know what is the reason. In here I have attached the web table image I used. I think both data are similar,

if any one knows how to solve this problem, please help me…
Thanks
Amilar


RE: Retrieve row number from web table - Surya - 06-20-2012

Hi Amilar,

Try giving start row and column numbers as below

Code:
Cesar").Frame("frm_spnGrid").WebTable("1").GetRowWithCellText ("BAH-05:00-QTP", colNum, 1)

here colNum is column number in which the text exists. Hope this works.

Regards,
Surya