Sha256: 22281c9422cb0fec0d37a935179ddb954a254b18c564a38dfc1989a595a30eeb
Contents?: true
Size: 1.08 KB
Versions: 33
Compression:
Stored size: 1.08 KB
Contents
package sh.calaba.instrumentationbackend.actions.gestures; import android.util.DisplayMetrics; import sh.calaba.instrumentationbackend.InstrumentationBackend; import sh.calaba.instrumentationbackend.Result; import sh.calaba.instrumentationbackend.actions.Action; import com.jayway.android.robotium.solo.Solo; public class Swipe implements Action { @Override public Result execute(String... args) { String direction = args[0]; if (args.length == 1) { if(direction.equalsIgnoreCase("left")) { InstrumentationBackend.solo.scrollToSide(Solo.LEFT); return Result.successResult(); } else if(direction.equalsIgnoreCase("right")) { InstrumentationBackend.solo.scrollToSide(Solo.RIGHT); return Result.successResult(); } return Result.failedResult("Invalid direction to swipe: " + direction); } return Result.failedResult("You must provide a direction. Either 'left' or 'right'"); } @Override public String key() { return "swipe"; } }
Version data entries
33 entries across 33 versions & 2 rubygems