【发布时间】:2019-11-25 22:26:48
【问题描述】:
我添加了这样的辅助功能键:
alertController.view.accessibilityIdentifier = "alertViewController"
当我尝试时:
app.otherElements["alertViewController"]
它不起作用。我怎样才能获得 alertController 中的动作?
【问题讨论】:
我添加了这样的辅助功能键:
alertController.view.accessibilityIdentifier = "alertViewController"
当我尝试时:
app.otherElements["alertViewController"]
它不起作用。我怎样才能获得 alertController 中的动作?
【问题讨论】:
警报控制器作为一个整体不是可访问性元素。您将需要搜索按钮(而不是其他元素)并使用本地化文本而不是标识符,因为您无权设置警报控制器的子视图的标识符。
【讨论】: