Ruby_capybara_How to validate asserting order of row contents taken from a table

13 views
Skip to first unread message

Anand JOis

unread,
May 5, 2016, 12:34:34 AM5/5/16
to appium-developers
I have a table in my native app,
I want to verify a column from table once sorted to check whether it sorted in ascending or descending order

Here is the piece of java code but I want it in Ruby capybara or Just Ruby

WebElement table_name = driver.findElement(By.xpath(“xpath”))

<List> Webelement row_count = table_name.findElements(By.tagname(”tr”));

Syso(“Total Rows”+rowcount.size());

 

ArrayList<Integer> row-data-int = new ArrayList< Integer >

For (rowNum=1;rowNum<row_count.size();rowNum++){

 

String row_data=Integer.parseInt(table_name.findElement(By.xpath(“path_beginning”+rowNum+”path_ending”)).getText();

row-data-int.add(row_data)

If(row_data[rowNum]<row_data[rowNum-1]

Isaac Murchie

unread,
May 5, 2016, 10:41:35 AM5/5/16
to appium-d...@googlegroups.com
This list is for the development of Appium, not its use. Please post such queries to https://discuss.appium.io/

Thanks,
Isaac.

--
You received this message because you are subscribed to the Google Groups "appium-developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to appium-develop...@googlegroups.com.
Visit this group at https://groups.google.com/group/appium-developers.
To view this discussion on the web visit https://groups.google.com/d/msgid/appium-developers/b2ad7e4a-d551-4e45-a9ec-b116953c9dc3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages