Sha256: b23a36af85ef94b24c049b2e033485fdc9599a38dc4680f66495b7a95224b9df
Contents?: true
Size: 969 Bytes
Versions: 17
Compression:
Stored size: 969 Bytes
Contents
package com.amplify.honeydew_server.actions; import android.util.Log; import com.amplify.honeydew_server.*; import com.android.uiautomator.core.*; import java.util.Map; public class ScrollToTextByIndex extends Action { public ScrollToTextByIndex(UiDevice uiDevice) { super(uiDevice); } @Override public Result execute(Map<String, Object> arguments) throws UiObjectNotFoundException { Log.i("ScrollToTextByIndex", "Found index field: " + arguments.get("index")); String text = (String) arguments.get("text"); int index = Integer.parseInt((String) arguments.get("index")); UiSelector scrollSelector = new UiSelector().scrollable(true).index(index); UiScrollable uiScrollable = new UiScrollable(scrollSelector); if(isUiObjectAvailable(uiScrollable, arguments)){ uiScrollable.scrollTextIntoView(text); return Result.OK; } return Result.FAILURE; } }
Version data entries
17 entries across 17 versions & 1 rubygems