I have an angular webpage. One of the page sections (an angular ui grid) contains nearly 1000 rows of data. Each row has 7 columns. (There is no table tag available anywhere in the HTML the grid is made using nested divs) At a time only 20 rows will be shown in the page section. Now using ruby and selenium I need to verify whether data displayed in 7th column is sorted in ascending order or not. I tried to do this by reading the contents of the angular ui grid to an array of arrays. But at any point of time when I fetch the elements data for only 20 rows are getting stored. After loading this page I tried again by doing a horizontal scroll and fetching the data. But still I get only 20 rows of data everytime I try. I believe only the data for the visible rows at the point of execution is only getting fetched. And I think the data is loaded dynamically to 20 rows on demand which are visible in the section.
Now what is the best logic I could use to verify whether data displayed in 7th column or any other column is sorted in ascending order or not !