Sha256: d75883e9c8d4990b28d21182993ce1765bf2836189f5690b9d1933f926898ec7

Contents?: true

Size: 875 Bytes

Versions: 120

Compression:

Stored size: 875 Bytes

Contents

package sh.calaba.instrumentationbackend.actions.view;

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

public class IsEnabled implements Action {

    @Override
    public Result execute(String... args) {
        final String firstArgument = args[0];
        final View foundView = TestHelpers.getViewById(firstArgument);
        
        if( null == foundView ) {
            return notFoundResult(firstArgument);
        }
        
        return new Result(foundView.isEnabled());
    }

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

    private Result notFoundResult(final String firstArgument) {
        return Result.failedResult(String.format("View with id %s was not found", firstArgument));
    }
}

Version data entries

120 entries across 120 versions & 2 rubygems

Version Path
calabash-android-0.3.8 test-server/instrumentation-backend/src/sh/calaba/instrumentationbackend/actions/view/IsEnabled.java
calabash-android-0.3.7 test-server/instrumentation-backend/src/sh/calaba/instrumentationbackend/actions/view/IsEnabled.java
calabash-android-0.3.6 test-server/instrumentation-backend/src/sh/calaba/instrumentationbackend/actions/view/IsEnabled.java
calabash-android-0.3.5 test-server/instrumentation-backend/src/sh/calaba/instrumentationbackend/actions/view/IsEnabled.java
calabash-android-0.3.4 test-server/instrumentation-backend/src/sh/calaba/instrumentationbackend/actions/view/IsEnabled.java
calabash-android-0.3.3 test-server/instrumentation-backend/src/sh/calaba/instrumentationbackend/actions/view/IsEnabled.java
calabash-android-0.3.3.pre5 test-server/instrumentation-backend/src/sh/calaba/instrumentationbackend/actions/view/IsEnabled.java
calabash-android-0.3.3.pre3 test-server/instrumentation-backend/src/sh/calaba/instrumentationbackend/actions/view/IsEnabled.java
calabash-android-0.3.3.pre2 test-server/instrumentation-backend/src/sh/calaba/instrumentationbackend/actions/view/IsEnabled.java
calabash-android-0.3.3.pre1 test-server/instrumentation-backend/src/sh/calaba/instrumentationbackend/actions/view/IsEnabled.java
calabash-android-0.3.2 test-server/instrumentation-backend/src/sh/calaba/instrumentationbackend/actions/view/IsEnabled.java
calabash-android-0.3.2.pre5 test-server/instrumentation-backend/src/sh/calaba/instrumentationbackend/actions/view/IsEnabled.java
calabash-android-0.3.2.pre4 test-server/instrumentation-backend/src/sh/calaba/instrumentationbackend/actions/view/IsEnabled.java
calabash-android-0.3.2.pre3 test-server/instrumentation-backend/src/sh/calaba/instrumentationbackend/actions/view/IsEnabled.java
calabash-android-0.3.2.pre2 test-server/instrumentation-backend/src/sh/calaba/instrumentationbackend/actions/view/IsEnabled.java
calabash-android-0.3.2.pre1 test-server/instrumentation-backend/src/sh/calaba/instrumentationbackend/actions/view/IsEnabled.java
calabash-android-0.3.1 test-server/instrumentation-backend/src/sh/calaba/instrumentationbackend/actions/view/IsEnabled.java
calabash-android-0.3.0 test-server/instrumentation-backend/src/sh/calaba/instrumentationbackend/actions/view/IsEnabled.java
calabash-android-0.3.0.pre10 test-server/instrumentation-backend/src/sh/calaba/instrumentationbackend/actions/view/IsEnabled.java
calabash-android-0.3.0.pre9 test-server/instrumentation-backend/src/sh/calaba/instrumentationbackend/actions/view/IsEnabled.java