Micro Focus QTP (UFT) Forums
[split] Web - 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 Beginners (https://www.learnqtp.com/forums/Forum-UFT-QTP-Beginners)
+--- Thread: [split] Web (/Thread-split-Web)



[split] Web - Anna - 07-15-2008

I am trying to get a cell value out from a web table. I think it's HTML or equivalent. I am not sure how to do it. I am able to do it in Winrun by saying tbl_get_cell_data (table, row, column, out_text) and I cannot figure out a QTP equivalent.


RE: Web - prince3105 - 07-16-2008

Hi anna Why dont you start a new thread and post your questions? That will help us to read every posts..


RE: Web - prince3105 - 07-16-2008

Try Below
Code:
CellValue = Browser().Page().WebTable().GetCellDAta(RowNo,ColumnNo)
MsgBox CellValue



RE: [split] Web - Ankur - 07-16-2008

As prince3105 suggested, Please make sure to have one question per thread.

I have splitted this thread.


RE: [split] Web - prince3105 - 07-16-2008

Thanks Ankur for your Instant action, I have been reading your posts for past one year.

Hats off


RE: Web - Anna - 07-16-2008

This works great. Next question: How do I know which column/row something is in. In Winrunner when you hovered over the object with the GUI Spy you could see Row/Column. What do I do in QTP?


RE: Web - prince3105 - 07-17-2008

Use Below

Code:
TableRowCount = Browser().page().WebTable().RowCount
TableColCount   = Browser().page().WebTable().ColumnCount
For i = 0 to TableRowCount-1
    For j = 0 to TableColCount-1
        CellValue = Browser().page().WebTable().GetCellData(i,j)
        Print "Row number - "&i
        Print "Column number - "&j
        Print CellValue
    Next
Next


Please Start a new thread for a new Post Anna.Sad


RE: Web - Anna - 07-17-2008

Thanks .. Smile