Micro Focus QTP (UFT) Forums
How to recognize table row and column - 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: VB Scripting/Descriptive Programming (https://www.learnqtp.com/forums/Forum-VB-Scripting-Descriptive-Programming)
+--- Thread: How to recognize table row and column (/Thread-How-to-recognize-table-row-and-column)



How to recognize table row and column - siwani - 06-10-2011

I am testing a delete functionality. I have to delete one user among several users from the UI and verify it at the back end.

i think i have to use a script to delete the user whoever comes in the first and first column because if i script selecting particular user, i cannot re run that script second time. Because the user would already be deleted in first set of run and QTP will not find the user second time and will fail the script. So how can i script in this scenario ?? Please help...Sad


RE: How to recognize table row and column - vijayendra.shukla - 06-15-2011

Can you please explain it further? I did not understand it quite well. Sorry.


RE: How to recognize table row and column - guin.anirban - 06-15-2011

You can get the 1st user run time (instead of passing the value from data table) and store it (If you need the deleted data in further verification). Then delete the 1st user and continue the rest.


RE: How to recognize table row and column - AutomationEngr - 06-19-2011

You can use the ChildObjectItem method on the table and get the object in cell(1,1)


RE: How to recognize table row and column - verma.vik6 - 04-05-2012

Code:
rCount=Browser().Page().WebTable().RowCount
for i=1 to rCount
    fname=Browser().Page().WebTable().GetCellData(i, 1)
'' Now you have the name stored in fname. Using this run your code to delete the user and iterate..
Next