1
我写了一个简单的脚本,通过我的应用程序中的菜单。我可以访问每个单元格,但我无法检索其名称。UIAutomation获取TableView单元名称
这是我的日志树:
而这些都是方法:
function goThroughAllSideMenuCells() {
for (var index = 0; index < sideMenuCellsCount; index++) {
var cellName = getNameForCellAtIndex(index);
UIALogger.logMessage(cellName);
if (cellName == "Check-in") {
openCheckInCell();
} else if (cellName == "Planta") {
openPlantaCell();
} else {
openSideMenuItemWithIdentifier(cellName);
}
}
}
function getNameForCellAtIndex(index) {
return sideMenu.cells()[index].name();
}
嗨@vyudi你有这个实现代码,你还没有定义sideMenu或sideMenuCellsCount? – Jules 2015-04-21 08:09:07