Как я могу установить accessibilityIdentifier для UIAlertController?

Вот как я просто создаюUIAlertController и представить его на экране:

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)
}

и вот как я получаю к нему доступ подUITests:

emailAlert = app.alerts["First Name"] //for title "First Name"

но я хотел бы установить там пользовательский идентификатор и получить к нему доступfirstName как это:

emailAlert = app.alerts["firstName"]

Является ли это возможным?

Ответы на вопрос(4)

Ваш ответ на вопрос