Javascript 在UI自动化测试中检测UITableViewAccessory
为了学习UI自动化,我编写了一个简单的待办事项列表,但在检测TableViewCells中的复选标记时遇到了困难Javascript 在UI自动化测试中检测UITableViewAccessory,javascript,xcode,swift,testing,automation,Javascript,Xcode,Swift,Testing,Automation,为了学习UI自动化,我编写了一个简单的待办事项列表,但在检测TableViewCells中的复选标记时遇到了困难 UIALogger.logMessage("adding a checkmark"); // get reference to a cell var cell = tableView.cells()["Butter"]; // tap the cell (adds a checkmark) cell.tap(); // make sure this is completed..
UIALogger.logMessage("adding a checkmark");
// get reference to a cell
var cell = tableView.cells()["Butter"];
// tap the cell (adds a checkmark)
cell.tap();
// make sure this is completed...
target.delay(2);
// view the child nodes
cell.logElementTree();
我在树中只能看到一个UIAStaticText,根本没有引用accessoryType
!如何查看是否将其设置为选中标记?试试看
[cell setAccessibilityLabel:@"someLabel"];
您还可以使用appium GUI检查辅助功能标签检出: