0

내가 appium 자동화와 함께 사용하기 위해, UITableViewRowAction의 버튼에 대한 접근성 라벨/값을 설정하기 위해 노력하고있어,하지만 어떤 이유에서 접근성이UITableViewRowAction accessibilityValue

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 속성은 제목의 이름을 가져옵니다. (취소)

이 유형의 객체에 대한 액세스 가능성을 수정할 수 있는지 궁금한가요?

답변

0

제목과 일치하거나 고유 한 accessibilityIdentifier을 설정하는 것이 좋습니다. 구체적으로는 이와 같은 UI 자동화 작업을위한 것입니다. 저것이 찌르는 지보십시오.

+0

불행히도 UITableViewRowAction에는 "accessibilityIdentifier"유형의 멤버가 없으므로 여기서는 사용할 수 없습니다 ... 내가 말한 것처럼 accessibilityValue가 어떤 이유로 작동하지 않습니다 ... – Igal