【问题标题】:In XCTest How to handle Picker wheels when the options in picker wheel are dynamic在xctest中,当拾音器轮中的选项动态时,如何处理拾音器车轮
【发布时间】:2016-12-05 11:07:08
【问题描述】:

我正在尝试自动化选择轮,但无法选择选择轮中的任何选项

尝试使用代码[[[[app descendantsMatchingType:XCUIElementTypeAny] childrenMatchingType:XCUIElementTypePicker] elementMatchingPredicate: [NSPredicate predicateWithFormat:@"2 of 6"]] tap];

这是我的可访问性检查器的外观

谁能帮帮我

【问题讨论】:

    标签: objective-c xctest


    【解决方案1】:

    您当前的代码将元素与“2 of 6”进行比较,而不是元素的值。

    将谓词格式更改为"value CONTAINS '2 of 6'"

    【讨论】:

    猜你喜欢
    • 2017-04-12
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2016-08-08
    • 1970-01-01
    • 2023-03-20
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多