我試圖在iPhone上設置一些UIAutomation測試。每當我在主窗口上執行logElementTree()時,我的所有UIATableView元素都有名稱「空列表」。我已經嘗試在相應的XIB文件中設置名稱,但一旦數據加載完畢,名稱就會再次設置爲「空列表」。下面是輸出的從調用logElementTree()的示例:UIATableView始終命名爲「空列表」
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}}]
正如你可以看到,表視圖不是空的。有誰知道我如何確保UIATableView元素的名稱不是「空列表」?有沒有我不在某個地方實施的代表?
這裏編寫代碼來解釋一下。 – Rodrigo 2011-06-16 19:48:43