如何在编辑标签时选择(-)图标,在Iphone ui自动化

How to select (-) icons while editing a tabel, in Iphone UIAutomation

本文关键字:图标 ui 自动化 Iphone 编辑 标签 选择      更新时间:2023-09-26

嗨,我正在学习手机上的UI-Automation,谁能告诉我在编辑表格时应该使用什么参考来选择(-)或(+)按钮

设置UITableView的编辑属性为true..

 tableView.editing=YES;

对于删除,这适用于我:

    tableView.cells()[cellName].switches()[0].setValue(true);
    tableView.cells()[cellName].buttons()[0].tap();

所以我假设对于"+"你只需要点击索引0处的按钮:

    tableView.cells()[cellName].buttons()[0].tap();

现在您可以使用Instruments来记录您的操作,这可能是获得适合您的正确语法的最简单方法。