0

I'm trying to set an accessibility label / value for the UITableViewRowAction's button , in order to use it with appium automation , but from some reason , the accessibility hasn't been recognised

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"

eventually , the value property remind as nil and the label property gets title's name (Cancel)

I was wondering if it possible to modify the accessibility for this type of object ?

Igal
  • 4,603
  • 14
  • 41
  • 66

1 Answers1

0

I'd encourage you to either match against the title or set a unique accessibilityIdentifier, which is specifically intended for UI automation tasks like this. See if that sticks.

Justin
  • 20,509
  • 6
  • 47
  • 58
  • 1
    unfortunately UITableViewRowAction has no member from type "accessibilityIdentifier" therefor I cannot use it here ... as I said, the accessibilityValue doesn't work from some reason ... – Igal Sep 25 '16 at 09:52