@Override protected void setUp() throws Exception { super.setUp(); mapper = createJsonMapper(); createSockets(); solo = new Solo(getInstrumentation(), this.getActivity()); actions = new Actions(getInstrumentation(), this); instrumentation = getInstrumentation(); TestHelpers.loadIds(instrumentation.getContext()); }
@Override public Result execute(String... args) { View view = TestHelpers.getTextViewByDescription(args[1]); if (view == null) { return new Result(false, "No view found with content description: '" + args[1] + "'"); } else if (!(view instanceof EditText)) { return new Result(false, "Expected EditText found: '" + view.getClass() + "'"); } else { InstrumentationBackend.solo.enterText((EditText) view, args[0]); return Result.successResult(); } }