Sha256: 8d9fdd13c7e826809f80a28f1dbd8f4bb682fdf980335af3d530348169469046
Contents?: true
Size: 1.07 KB
Versions: 17
Compression:
Stored size: 1.07 KB
Contents
package com.amplify.honeydew_server.actions; import com.amplify.honeydew_server.*; import com.android.uiautomator.core.*; import java.util.Map; public class LaunchApp extends Action { public LaunchApp(UiDevice uiDevice) { super(uiDevice); } @Override public Result execute(Map<String, Object> arguments) throws UiObjectNotFoundException { String appName = (String) arguments.get("appName"); getUiDevice().pressHome(); final UiObject uiObject = new UiObject(new UiSelector().description("Apps")); if(isUiObjectAvailable(uiObject,arguments)){ uiObject.click(); }else{ return Result.FAILURE; } UiScrollable appViews = new UiScrollable(new UiSelector().scrollable(true)); if(isUiObjectAvailable(appViews, arguments)){ appViews.setAsHorizontalList(); appViews.getChildByText(new UiSelector().className(android.widget.TextView.class.getName()), appName).clickAndWaitForNewWindow(); return Result.OK; } return Result.FAILURE; } }
Version data entries
17 entries across 17 versions & 1 rubygems