iOS UIAActivityIndicator "in progress" remains in XML after it physically disappears from UI

Appium.app 1.3.6
Xcode 6.2
iOS 8.2 iPhone 6 sim
Python bindings

I have a dynamic UIATableView composed of any number of UIATableCells separated by some UIATableGroups. When the view first loads, all of the UIATableGroups and UIATableCells are allocated and rendered. However, the full contents of each of the UIATableCells are not as they’re waiting for API responses. Instead they are each presented with a UIAActivityIndicator with the name=“In progress” that then visually disappears once the loading for each cell has completed, as well as disappears from the XML / page source.

This is all fairly simple and functionally works well from a user standpoint.

The problem I’m experiencing is that the XML / page source is not being updated properly and instead continues to retain the UIAActivityIndicator and not present the full UIATableCells elements as the user can physically see on the screen. So my test have explicit waits for the UIAActivityIndicator, timeout after 120 seconds of waiting (when they’ve disappeared within 10 seconds usually), and then the subsequent code fails since it’s trying to scrape child elements in the cell that do not physically exist since the XML reports the UIAActivityIndicator is still present instead.

Seems that stale data is being served.

How do I chase down the root cause of this?

Sometimes talking out loud brings clarity. :smile:

The issue appears to be that the UIATableCells that are physically out of view are not updated in the XML. So, open the view, scroll the bottom and now the top most cells that are out of view cannot be polled for the UIAActivityIndicator. This should be a minor challenge as I often need to interact with long UIATableViews full of dynamically filled cells.

Normally I click a UI element to open a new page view. Then explicitly wait for a variety of elements to appear, or in the case of UIAActivityIndicator I wait for them to disappear as they are a good indicator that a view has loaded and further scripts can be executed.

But when you have a list of 100 cells that all have loading spinners, but cannot just open the page and wait for them all to disappear since they’re out of view… Hmmmm. Need to think of the best way to approach this.

I got a problem which is ok for user manual test,but can’t get the content from appium. It’s a dynamic content from the page