Quantcast
Channel: Recent Threads — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 204402

How best to verify rows in a ListView/UITableView?

$
0
0

With UITest, I am testing some filtering functionality which filters results displayed in a ListView/UITableView. My test filters a known dataset with a hardcoded value. Therefore, I know how many results should be returned. I want to verify in my UITest that my ListView/UITableView has the correct number of rows AND that each row has the correct value based on the filter. I was able to figure this out as long as the results fit on one page. However, as soon as the number of rows exceed the page scroll limit, UITest only returns what is visible. I would need to scroll down, check the new rows displayed, and repeat until I reach the bottom. This is where I am stuck.

How can I count and check the value inside every row of a ListView/UITableView when scrolling is needed to see them all?

I can use ScrollDown() which seems to scroll exactly one page at a time, but how do I know when I reach the bottom? It would be nice if the scrolling methods returned a bool so we know if any scrolling actually happened.


Viewing all articles
Browse latest Browse all 204402

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>