Creating a checkpoint for webtable sort order
I have a webtable that has several columns. In the application, the user can left click on the column headers (ex. Order Number) to sort the table by that column. First click sorts by descending, second click sorts by ascending. I need to confirm that the sort order is working in my test.
I tried creating a datatable checkpoint for the Order Number column but it always fails. The number of records in the table will constantly grow as more records are created, but the initial record is a constant. I know that when sorting by Order Number, the initial record will always be either the first record listed (ascending) or the last (descending). When sort order is ascending, the Order Number for the initial record is in cell 1,1 of the datatable. When sort order is descending, it constantly changes. On one iteration it may be 300, but the next time it will be 301 if a new record has been created.
For my checkpoint, the only cell that has a blue checkmark is cell 1,1 or cell x,1 (where X is the last row in the datatable. These checkpoints always fail, even though the sort order capability is working.
Any assistance is appreciated.
Re: Creating a checkpoint for webtable sort order
The checkpoint always fails, if values are not absolutely identical. But you can do your comparison with little VBscript function:
1. Retrieve the values of the cells, you need to compare
2. Compare first characters of each String