我正在尝试为UITableViewRowAction的按钮设置一个辅助功能标签/值,以便在appium自动化中使用它,但是由于某种原因,辅助功能还没有被识别出来
cancel = UITableViewRowAction(style: .Destructive, title: title) { action, index in
tableView.setEditing(false, animated: true)
let order = self.viewModel.orders[indexPath.row].order
self.performSegueWithIdentifier( self.cancelOrderConfirmationSegueId, sender: order)
}
cancel.accessibilityValue = "SomeValue"
cancel.accessibilityLabel = "SomeLabel"最后,value属性提醒为nil,label属性获取title的名称(取消)
我想知道是否可以修改这种类型的对象的可访问性?
发布于 2016-09-21 23:02:01
我鼓励您要么匹配标题,要么设置一个唯一的accessibilityIdentifier,它专门用于像这样的UI自动化任务。看看能不能坚持下去。
https://stackoverflow.com/questions/39617341
复制相似问题