Sha256: bb49208c8171d0a85f78498781d33e81b23802653533570870a791b6bcb5d1a8

Contents?: true

Size: 905 Bytes

Versions: 13

Compression:

Stored size: 905 Bytes

Contents

package sh.calaba.instrumentationbackend.actions.search;

import android.widget.SearchView;
import sh.calaba.instrumentationbackend.InstrumentationBackend;
import sh.calaba.instrumentationbackend.Result;
import sh.calaba.instrumentationbackend.actions.Action;

public class EnterQueryByIndex implements Action {
    @Override
    public Result execute(String... args) {

        final String query = args[0];
        final SearchView view = (SearchView) InstrumentationBackend.solo.getView(
                SearchView.class, Integer.parseInt(args[1]) - 1);

        InstrumentationBackend.instrumentation.runOnMainSync(new Runnable() {
            @Override
            public void run() {
                view.setQuery(query, true);
            }
        });

        return Result.successResult();
    }

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

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
calabash-android-0.3.3.pre3 test-server/instrumentation-backend/src/sh/calaba/instrumentationbackend/actions/search/EnterQueryByIndex.java
calabash-android-0.3.3.pre2 test-server/instrumentation-backend/src/sh/calaba/instrumentationbackend/actions/search/EnterQueryByIndex.java
calabash-android-0.3.3.pre1 test-server/instrumentation-backend/src/sh/calaba/instrumentationbackend/actions/search/EnterQueryByIndex.java
calabash-android-0.3.2 test-server/instrumentation-backend/src/sh/calaba/instrumentationbackend/actions/search/EnterQueryByIndex.java
calabash-android-0.3.2.pre5 test-server/instrumentation-backend/src/sh/calaba/instrumentationbackend/actions/search/EnterQueryByIndex.java
calabash-android-0.3.2.pre4 test-server/instrumentation-backend/src/sh/calaba/instrumentationbackend/actions/search/EnterQueryByIndex.java
calabash-android-0.3.2.pre3 test-server/instrumentation-backend/src/sh/calaba/instrumentationbackend/actions/search/EnterQueryByIndex.java
calabash-android-0.3.2.pre2 test-server/instrumentation-backend/src/sh/calaba/instrumentationbackend/actions/search/EnterQueryByIndex.java
calabash-android-0.3.2.pre1 test-server/instrumentation-backend/src/sh/calaba/instrumentationbackend/actions/search/EnterQueryByIndex.java
calabash-android-0.3.1 test-server/instrumentation-backend/src/sh/calaba/instrumentationbackend/actions/search/EnterQueryByIndex.java
calabash-android-0.3.0 test-server/instrumentation-backend/src/sh/calaba/instrumentationbackend/actions/search/EnterQueryByIndex.java
calabash-android-0.3.0.pre10 test-server/instrumentation-backend/src/sh/calaba/instrumentationbackend/actions/search/EnterQueryByIndex.java
calabash-android-0.3.0.pre9 test-server/instrumentation-backend/src/sh/calaba/instrumentationbackend/actions/search/EnterQueryByIndex.java