【发布时间】:2011-03-28 07:52:27
【问题描述】:
我正在尝试通过 iPhone 模拟器和最新的 iOS SDK 4.2 在 Instruments 中使用 UIAutomation。在我有 2 个未标记工具栏的应用中,我只能访问 head-toolbar,例如:
var window = UIATarget.localTarget().frontMostApp().mainWindow();
window.toolbar().buttons()["上传"].isVisible();
并且不能对未标记工具栏中的按钮(取消、确定、前进)使用 isVisible()(在下面附上我的日志)
4) UIAToolbar [名称:(null) 值:(null) NSRect: {{0, 20}, {320, 44}}] 5) UIAButton [name:angle_bracket_left_i value:(null) NSRect: {{-3, 16}, {50, 51}}] 5) UIAButton [name:angle_bracket_right_value:(null) NSRect: {{27, 16}, {50, 51}}] 5) UIATextField [name:(null) value:http://www.google.com.vn/ NSRect: {{72, 29}, {164, 26}}] 5) UIAButton [名称:上传值:(null) NSRect: {{246, 29}, {34, 27}}] 5) UIAButton [名称:刷新值:(null) NSRect: {{285, 24}, {28, 33}}] 4) UIAToolbar [name:(null) value:(null) NSRect: {{0, 436}, {320, 44}}] 5) UIAButton [name:cancel value:(null) NSRect: {{1, 439}, {50, 40}}] 5) UIAButton [name:ok value:(null) NSRect: {{132, 430}, {50, 51}}] 5) UIAButton [name:forward value:(null) NSRect: {{263, 430}, {50, 51}}]
【问题讨论】:
标签: iphone ios-4.2 ios-ui-automation