ios - 可以使用 SLButton 或 SLElement 关闭弹出窗口中显示的 UIActionSheet 吗?

标签 ios automation subliminal

我试过:

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

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

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

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

谢谢。

编辑:

Instruments 中记录的错误:

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

最佳答案

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

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

相关文章:

ios - 通过 cocoa pod 安装 Subliminal

iphone - 在 iOS 上加载压缩图像的最快方法是什么?

java - 如何从 HTML 网站中提取数据?

ios - 'sizeWithFont :constrainedToSize:lineBreakMode:'is deprecated:

c# - 从 C# 自动化遗留 Java 应用程序

ios - 在 UIBarButtonItem 上以编程方式设置可访问性标识符

ios - 如何在 Subliminal 中断言 UINavigationController 的标题文本?

ios - 为什么 GLSL 的算术函数在 iPad 上与在模拟器上产生如此不同的结果?

ios - 在 Swift 4 中手动设置 iOS 相机的曝光