How can I get the keyboard dismissed when using UI Automation tests? I've been looking at UIAElement and UIATextField documentation but couldn't find something that suggests so.
var textField = toolbar.textFields()[0];
var textView = toolbar.textViews()[0];
function testFeature1() {
if (textField.hasKeyboardFocus() || textView.hasKeyboardFocus()) {
// Resign first responder .. How?
}
// Do my tests
}