server/src/main/java/com/amplify/honeydew_server/actions/SetTextByLabel.java in honeydew-0.14.0 vs server/src/main/java/com/amplify/honeydew_server/actions/SetTextByLabel.java in honeydew-0.15.0

- old
+ new

@@ -17,12 +17,16 @@ @Override public Result execute(Map<String, Object> arguments) throws UiObjectNotFoundException { String label = (String) arguments.get("label"); String inputText = (String) arguments.get("text"); - UiObject textField = null; - textField = new UiObject(new UiSelector().text(label)); - textField.setText(inputText); - uiDevice.pressDPadDown(); - return Result.OK; + UiObject textField = new UiObject(new UiSelector().text(label)); + + if (isUiObjectAvailable(textField, arguments)) { + textField.setText(inputText); + uiDevice.pressDPadDown(); + return Result.OK; + } + + return Result.FAILURE; } }