We are trying to automate a Xamarin.Forms app in iOS through Appium.
Adding AutomationId alone isn`t enough to inspect ListView elements in the Appium.
We have added following property (AutomationProperties.IsInAccessibleTree=“False”) as mentioned in the below Xamarin Forum link.
Now, we are able to inspect ListView elements but we are facing another issue with respect to loading items in Listview.
When we click refresh in Appium, depending on the data/rows in ListView Appium takes more time to load ListView.
ListView is enabled with RetainElement as ListViewCachingStrategy and supported with Infinite Scrolling/Pagination.
On further analysis Appium seems to load all the data instead of trying to load only visible data in the Listview whereas in actual usage the infinite scroll triggers only after scrolling to the last item in the current avaialble data.
For instance: Let`s say only 5 rows are displayed in Listview. When we click refresh in Appium, it should try to load only 5 rows into it. Instead it tries to load all 20 rows of the first set.
Since infinite scroll is enabled,the next set/page/bucket of data should be fetched only when the last item has appeared or made visible by scrolling. As it is trying to load all the rows it automatically triggers the infinite scrolling to fetch the next set and it repeats until all the rows in the list are fetched.
This makes the UI unusable until all rows are loaded.
Would like to know if this is the expected behavior in Appium or any settings or work around in Appium/Xamarin could be suggested.
Thanks in Advance !!!..
Saravana Pandian M.