Search code examples
iosui-automationappium

iOS UI Automation - UIATableCell returning old value


I have an Appium tests that interacts with a UITableView. The test performs an action that results in a label in the cell changing.

When the test tries to verify the updated label it is returned the old value, though visual inspection clearly shows the new value. The Appium inspector also shows the old value, so does the iOS Accessibility Inspector.

The only way I can find to view the updated value is to force the cell to be recreated.

How can I force Appium / iOS instruments to return the updated label value?


Solution

  • This issue was caused by the cell implementing the UIAccessibilityContainer Protocol incorrectly. The implementation built the accessibility elements once and then always returned that same cached response.