title: Is there anyway to test sorting functionality of a web table in either Selenium Webdriver or Katalon Studio?
body: <p>Is it possible to test the sorting functionality of a web table in Katalon Studio/Selenium Webdriver? 
  Does Katalon Studio/Selenium Webdriver have any default method to verify whether the datas within a single column is either in ascending or descending order?</p>
  
  <p>The following is the code that I used to fetch all the values listed in the 1st column of a web table and save them in an array: </p>
  
  <pre><code>WebDriver driver = DriverFactory.getWebDriver()
  
  'To locate table'
  
  WebElement Table = driver.findElement(By.xpath('/html[1]/body[1]/table[1]/tbody[1]'))
  
  
  
  'To locate rows of table it will Capture all the rows available in the table'
  
  List&lt;WebElement&gt; rows_table = Table.findElements(By.tagName('tr'))
  
  
  
  'To calculate no of rows In table'
  
  int rows_count = rows_table.size()
  
  
  
  String[] celltext = new String[rows_count]
  
  for (int row = 0; row &lt; rows_count; row++) {
  
  'To locate columns(cells) of that specific row'
  
  List&lt;WebElement&gt; Columns_row = rows_table.get(row).findElements(By.tagName('td'))
  
  'It will retrieve text from 1st cell'
  
  String celltext_1 = Columns_row.get(0).getText()
  
  celltext[row] = celltext_1
  
  }
  </code></pre>
  
  <p>For example, celltext = [4,3,2,1]
  Now I want to verify that the values saved in celltext is in descending order. </p>
  
  <p>Any help will be highly appreciated.</p>