OGeek|极客世界-中国程序员成长平台

标题: ios - 可以使用 SLButton 或 SLElement 来关闭弹出窗口中呈现的 UIActionSheet 吗? [打印本页]

作者: 菜鸟教程小白    时间: 2022-12-12 12:41
标题: ios - 可以使用 SLButton 或 SLElement 来关闭弹出窗口中呈现的 UIActionSheet 吗?

我试过了:

SLButton *actionSheetButton = [SLButton elementWithAccessibilityLabel"Remove"]; // also tried same with SLElement

BOOL popoverDisplayed = SLWaitUntilTrue([UIAElement(actionSheetButton) isValidAndVisible], 3.0);

if (popoverDisplayed) {
    [UIAElement(actionSheetButton) tap];
}

我能够使用 SLPopover 关闭/取消操作表,但我想测试按钮操作。

谢谢。

编辑:

仪器中记录的错误:

Unexpected exception occurred ***SLUIAElementNotTappableException*** for reason: Element '<SLButton description:"Remove">' is not tappable.



Best Answer-推荐答案


Subliminal 中有两个错误,即 Subliminal 根本无法操作 Action 表,然后当它们处于弹出框时,进一步无法操作 Action 表。 This issue为任何感兴趣的人提供更多详细信息。这些错误在提交 450f37ce28 时已修复上主。感谢@Andrew 的报告!

关于ios - 可以使用 SLButton 或 SLElement 来关闭弹出窗口中呈现的 UIActionSheet 吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17757660/






欢迎光临 OGeek|极客世界-中国程序员成长平台 (http://ogeek.cn/) Powered by Discuz! X3.4