Sha256: ee70da6da4036b04bee8ecb5649fb3474b06bc0e6734a2d9102d043a85d771dd

Contents?: true

Size: 1.02 KB

Versions: 159

Compression:

Stored size: 1.02 KB

Contents

package sh.calaba.instrumentationbackend.actions.text;


import sh.calaba.instrumentationbackend.InstrumentationBackend;
import sh.calaba.instrumentationbackend.Result;
import sh.calaba.instrumentationbackend.TestHelpers;
import sh.calaba.instrumentationbackend.actions.Action;
import android.view.View;
import android.widget.EditText;


public class EnterTextByContentDescription implements Action {

    @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();
        }
    }

    @Override
    public String key() {
        return "enter_text_into_named_field";
    }

}

Version data entries

159 entries across 159 versions & 2 rubygems

Version Path
calabash-android-0.2.10 test-server/instrumentation-backend/src/sh/calaba/instrumentationbackend/actions/text/EnterTextByContentDescription.java
calabash-android-0.2.9 test-server/instrumentation-backend/src/sh/calaba/instrumentationbackend/actions/text/EnterTextByContentDescription.java
calabash-android-0.2.8 test-server/instrumentation-backend/src/sh/calaba/instrumentationbackend/actions/text/EnterTextByContentDescription.java
calabash-android-0.2.7 test-server/instrumentation-backend/src/sh/calaba/instrumentationbackend/actions/text/EnterTextByContentDescription.java
calabash-android-0.2.6 test-server/instrumentation-backend/src/sh/calaba/instrumentationbackend/actions/text/EnterTextByContentDescription.java
calabash-android-0.2.5 test-server/instrumentation-backend/src/sh/calaba/instrumentationbackend/actions/text/EnterTextByContentDescription.java
calabash-android-0.2.4 test-server/instrumentation-backend/src/sh/calaba/instrumentationbackend/actions/text/EnterTextByContentDescription.java
calabash-android-0.2.3 test-server/instrumentation-backend/src/sh/calaba/instrumentationbackend/actions/text/EnterTextByContentDescription.java
calabash-android-0.2.2 test-server/instrumentation-backend/src/sh/calaba/instrumentationbackend/actions/text/EnterTextByContentDescription.java
calabash-android-0.2.1 test-server/instrumentation-backend/src/sh/calaba/instrumentationbackend/actions/text/EnterTextByContentDescription.java
calabash-android-0.2.0 test-server/instrumentation-backend/src/sh/calaba/instrumentationbackend/actions/text/EnterTextByContentDescription.java
calabash-android-0.2.0.pre10 test-server/instrumentation-backend/src/sh/calaba/instrumentationbackend/actions/text/EnterTextByContentDescription.java
calabash-android-0.2.0.pre9 test-server/instrumentation-backend/src/sh/calaba/instrumentationbackend/actions/text/EnterTextByContentDescription.java
calabash-android-0.2.0.pre8 test-server/instrumentation-backend/src/sh/calaba/instrumentationbackend/actions/text/EnterTextByContentDescription.java
calabash-android-0.2.0.pre7 test-server/instrumentation-backend/src/sh/calaba/instrumentationbackend/actions/text/EnterTextByContentDescription.java
calabash-android-0.2.0.pre6 test-server/instrumentation-backend/src/sh/calaba/instrumentationbackend/actions/text/EnterTextByContentDescription.java
calabash-android-0.2.0.pre5 test-server/instrumentation-backend/src/sh/calaba/instrumentationbackend/actions/text/EnterTextByContentDescription.java
calabash-android-0.2.0.pre4 test-server/instrumentation-backend/src/sh/calaba/instrumentationbackend/actions/text/EnterTextByContentDescription.java
calabash-android-0.2.0.pre3 test-server/instrumentation-backend/src/sh/calaba/instrumentationbackend/actions/text/EnterTextByContentDescription.java
calabash-android-0.2.0.pre2 test-server/instrumentation-backend/src/sh/calaba/instrumentationbackend/actions/text/EnterTextByContentDescription.java