【问题标题】:Detecting UITableViewAccessory in UI Automation Testing在 UI 自动化测试中检测 UITableViewAccessory
【发布时间】:2015-04-27 18:15:44
【问题描述】:

为了学习 UI 自动化,我编写了一个简单的 ToDo 列表,但在我的 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...
target.delay(2);

// view the child nodes
cell.logElementTree();

我在树中只能看到一个 UIAStaticText,根本没有引用 accessoryType!如何查看是否设置为Checkmark

【问题讨论】:

    标签: javascript xcode swift testing automation


    【解决方案1】:

    试试

    [cell setAccessibilityLabel:@"someLabel"];
    

    【讨论】:

    • 您也可以使用 appium GUI 来检查可访问性标签,请查看:appium.io
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2010-12-16
    • 2010-11-24
    • 1970-01-01
    • 2011-11-25
    • 1970-01-01
    • 2021-01-01
    相关资源
    最近更新 更多