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

- old
+ new

@@ -1,10 +1,11 @@ package com.amplify.honeydew_server.actions; import com.amplify.honeydew_server.Action; import com.amplify.honeydew_server.Result; import com.android.uiautomator.core.UiDevice; +import com.android.uiautomator.core.UiObject; import com.android.uiautomator.core.UiObjectNotFoundException; import java.util.Map; public class Click extends Action { @@ -12,9 +13,15 @@ super(uiDevice); } @Override public Result execute(Map<String, Object> arguments) throws UiObjectNotFoundException { - getUiObject(arguments).click(); - return Result.OK; + final UiObject uiObject = getUiObject(arguments); + + if (isUiObjectAvailable(uiObject, arguments)) { + uiObject.click(); + return Result.OK; + } + + return Result.FAILURE; } }