Como posso definir accessibilityIdentifier como UIAlertController?
É assim que eu simplesmente crioUIAlertController
e apresente na tela:
private class func showAlertWithTitle(title: String, message: String) {
let alert = UIAlertController(title: title, message: message, preferredStyle: .Alert)
//alert.accessibilityLabel = "my string here" //doesnt work
let action = UIAlertAction(title: "OK", style: .Default) { action in
alert.dismissViewControllerAnimated(true, completion: nil)
}
alert.addAction(action)
UIStoryboard.topViewController()?.presentViewController(alert, animated: true, completion: nil)
}
e é assim que eu o acesso emUITests:
emailAlert = app.alerts["First Name"] //for title "First Name"
mas eu gostaria de definir um identificador personalizado e acessar isso porfirstName
como isso:
emailAlert = app.alerts["firstName"]
É possível?