Sha256: 030d9dd28f6b6a7365d06880f4428dbbbfbc5e50b1637f0bdc49bcef7cd690dc

Contents?: true

Size: 1.06 KB

Versions: 163

Compression:

Stored size: 1.06 KB

Contents

package sh.calaba.instrumentationbackend.actions.time;


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.TimePicker;


public class SetTimeByContentDescription implements Action {

    @Override
    public Result execute(String... args) {
        int[] time = TestHelpers.parseTime(args[1]);
        String contentDescription = args[0];
        View view = TestHelpers.getViewByDescription(contentDescription);
        
        if(view != null && view instanceof TimePicker) {
            InstrumentationBackend.solo.setTimePicker((TimePicker)view, time[0], time[1]); 
        } else {
            return new Result(false, "Failed to find TimePicker with content description:'" + contentDescription + "'"); 
        }
        
        return Result.successResult();
    }

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

}

Version data entries

163 entries across 163 versions & 2 rubygems

Version Path
calabash-android-0.4.3.pre1 test-server/instrumentation-backend/src/sh/calaba/instrumentationbackend/actions/time/SetTimeByContentDescription.java
testautoa-0.4.1 test-server/instrumentation-backend/src/sh/calaba/instrumentationbackend/actions/time/SetTimeByContentDescription.java
calabash-android-0.4.2 test-server/instrumentation-backend/src/sh/calaba/instrumentationbackend/actions/time/SetTimeByContentDescription.java
calabash-android-0.4.1 test-server/instrumentation-backend/src/sh/calaba/instrumentationbackend/actions/time/SetTimeByContentDescription.java
calabash-android-0.4.0 test-server/instrumentation-backend/src/sh/calaba/instrumentationbackend/actions/time/SetTimeByContentDescription.java
calabash-android-0.4.0.pre18 test-server/instrumentation-backend/src/sh/calaba/instrumentationbackend/actions/time/SetTimeByContentDescription.java
testautoa-0.4.0.pre19 test-server/instrumentation-backend/src/sh/calaba/instrumentationbackend/actions/time/SetTimeByContentDescription.java
testautoa-0.4.0.pre18 test-server/instrumentation-backend/src/sh/calaba/instrumentationbackend/actions/time/SetTimeByContentDescription.java
testautoa-0.4.0.pre16 test-server/instrumentation-backend/src/sh/calaba/instrumentationbackend/actions/time/SetTimeByContentDescription.java
calabash-android-0.4.0.pre17 test-server/instrumentation-backend/src/sh/calaba/instrumentationbackend/actions/time/SetTimeByContentDescription.java
calabash-android-0.4.0.pre16 test-server/instrumentation-backend/src/sh/calaba/instrumentationbackend/actions/time/SetTimeByContentDescription.java
calabash-android-0.4.0.pre15 test-server/instrumentation-backend/src/sh/calaba/instrumentationbackend/actions/time/SetTimeByContentDescription.java
calabash-android-0.4.0.pre11 test-server/instrumentation-backend/src/sh/calaba/instrumentationbackend/actions/time/SetTimeByContentDescription.java
calabash-android-0.4.0.pre10 test-server/instrumentation-backend/src/sh/calaba/instrumentationbackend/actions/time/SetTimeByContentDescription.java
calabash-android-0.4.0.pre9 test-server/instrumentation-backend/src/sh/calaba/instrumentationbackend/actions/time/SetTimeByContentDescription.java
calabash-android-0.4.0.pre8 test-server/instrumentation-backend/src/sh/calaba/instrumentationbackend/actions/time/SetTimeByContentDescription.java
calabash-android-0.4.0.pre7 test-server/instrumentation-backend/src/sh/calaba/instrumentationbackend/actions/time/SetTimeByContentDescription.java
calabash-android-0.4.0.pre6 test-server/instrumentation-backend/src/sh/calaba/instrumentationbackend/actions/time/SetTimeByContentDescription.java
calabash-android-0.4.0.pre5 test-server/instrumentation-backend/src/sh/calaba/instrumentationbackend/actions/time/SetTimeByContentDescription.java
calabash-android-0.4.0.pre4 test-server/instrumentation-backend/src/sh/calaba/instrumentationbackend/actions/time/SetTimeByContentDescription.java