I'm facing a problem and need your help. In my web app, we do lot of searches on different criteria. I need to compare the search results. How can I save these results so that when I run the test script, it has to compare the results with the saved results.
These search results are displayed ad webtables. Can I save the webtables? But the webtable has the same id but the results will be different for each criteria. Like that I need to save & compare around 300 tables. Any ideas how to save them in respository?
If a search always produces the same predictable results (by this I mean one specific search - you may have many different specific searches, each of which might produce predictable results), you can use any of several types of checkpoints to verify the search results, or create your own using a series of GetROProperties on important fields in the search results and comparing to expected values.
If you have many searches, each of which produces predictable results, you can repeat the above as often as you need.
If a search produces dynamic results that might be different each time, it gets much harder. In this case, you probably need to reproduce the search in your QTP script, using SQL statements (or whatever statements you need for this) so that your script can dynamically generate the expected results. Then you use the series of GetROProperties on important fields in the application search results and comparing to you generated expected values.
[ QUOTE ]
I'm searching for 'comparing the saved webtables(in repository) with the webtables on the web app pages'.
[/ QUOTE ]
When you say saved webtable in repository then it only the WebTable object that is stored and not the actual data inside it. You either need to use a Table checkpoint which i wont suggest you because of the flexibility that you loose using checkpoint. Or you can use code on the WebTable using a loop and GetCellData to do the comparison.