Sha256: 609b08f0eab544ac6810de7d440a3a0c82cf59ce1515abd51b8a6607631a919d
Contents?: true
Size: 789 Bytes
Versions: 17
Compression:
Stored size: 789 Bytes
Contents
package com.amplify.honeydew_server.actions; import com.amplify.honeydew_server.*; import com.android.uiautomator.core.*; import java.util.Map; public class SetTextByIndex extends Action { public SetTextByIndex(UiDevice uiDevice) { super(uiDevice); } @Override public Result execute(Map<String, Object> arguments) throws UiObjectNotFoundException { int index = Integer.parseInt((String) arguments.get("index")); String text = (String) arguments.get("text"); UiObject textField = new UiObject(new UiSelector().className("android.widget.EditText").index(index)); if (isUiObjectAvailable(textField, arguments)) { textField.setText(text); return Result.OK; } return Result.FAILURE; } }
Version data entries
17 entries across 17 versions & 1 rubygems