Posts: 3
Threads: 2
Joined: Aug 2009
Reputation:
0
08-27-2009, 10:13 PM
I'm new to QTP. I have a webtable in my application. I would like to compare the table contents against a database table. I wanted to compare number of rows, number of columns and cell contents. Could anybody please help me with it?
Posts: 1,199
Threads: 5
Joined: Nov 2008
Reputation:
0
08-28-2009, 10:30 AM
Hi LTFL,
There are mthods in QTP for webtable object to get the required info.
RowCount- Returns the number of rows in the table.
ColumnCount- Returns the number of columns in the table.
GetCellData -Returns the text contained in the specified cell.
for more details look for webtable object in QTP help.
to compare these with database- you will need to connect to database, get the recordset using your query.
all these info will be there in recordset. which can be compared as required.
hope this info is sufficient to proceed with and let us know if you have any issue, Paste your lines of code as well so that we can help you in better way.