How to test sort order in Web Table
Just been on the intro QTP course and actually starting to apply the theory in QTP by automating a few sections of exising manual specs.
The application under test allows you to search for various records and displays the results in a "blotter" comprising of columns and rows.
By clicking the column headers you can sort ascend/descend.
My question is what is the best way to check this in the normal mode?
QTP has got the properties of the webtable (column header then the values.
Do I apply a checkpoint to check against the data table (having correctly sorted them in the excel table.) This obviuosly hinges on a known data set in the db.
Any advice on how to best do it appreciated!
Re: How to test sort order in Web Table
Just get all the cell values into an array and make sure each consecutive element in the array is either in increasing or decreasing order. Use StrComp function.