I have webpage which has 10 columns. I need to check if 2 columns are sorted or not. The checking of the sort is not separately but compositely something like SQL order by. The two columns in consideration are Id, name. How would I write a test case for this condition? Please advise
You first need to get both columns into an array. Once done you will write a nested loop to check for sorting. The first array will be checked in outer loop and the inner loop will only run when you have consecutive same values in column1.