I'm trying to set up some UIAutomation tests on the iPhone. Whenever I execute logElementTree() on the main window, all of my UIATableView elements have the name "Empty list." I have tried setting the name in the corresponding XIB file, but once data is loaded, the name is set to "Empty list" again. The below is an example of output from invoking logElementTree():
4) UIATableView [name:Empty list value:rows 1 to 1 of 1 rect:{{x:0, y:64}, {width:320, height:416}}]
5) UIATableCell [name:OfferCardTableViewCell value:(null) rect:{{x:0, y:160}, {width:320, height:416}}]
6) UIAWebView [name:(null) value:(null) rect:{{x:0, y:160}, {width:320, height:418}}]
6) UIAWebView [name:(null) value:(null) rect:{{x:320, y:160}, {width:320, height:418}}]
6) UIAWebView [name:(null) value:(null) rect:{{x:640, y:160}, {width:320, height:418}}]
As you can see, the table view is not empty. Does anyone know how I can ensure that the UIATableView element is given a name other than "Empty list?" Is there a delegate that I am not implementing somewhere?
You want to set an accessibilityLabel for the UITableView. In Xcode 4 at least, you can't set this property in Interface Builder -- so you will have to do it programatically.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With