public class AndroidMobileCommandHelper extends MobileCommand
CLOSE_APP, commandRepository, COMPLEX_FIND, CURRENT_ACTIVITY, END_TEST_COVERAGE, GET_DEVICE_TIME, GET_NETWORK_CONNECTION, GET_SESSION, GET_SETTINGS, GET_STRINGS, HIDE_KEYBOARD, INSTALL_APP, IS_APP_INSTALLED, IS_LOCKED, LAUNCH_APP, LOCK, LONG_PRESS_KEY_CODE, OPEN_NOTIFICATIONS, PERFORM_MULTI_TOUCH, PERFORM_TOUCH_ACTION, PRESS_KEY_CODE, PULL_FILE, PULL_FOLDER, PUSH_FILE, REMOVE_APP, REPLACE_VALUE, RESET, RUN_APP_IN_BACKGROUND, SET_NETWORK_CONNECTION, SET_SETTINGS, SET_VALUE, SHAKE, START_ACTIVITY, TOGGLE_LOCATION_SERVICES, UNLOCK
Constructor and Description |
---|
AndroidMobileCommandHelper() |
Modifier and Type | Method and Description |
---|---|
static Map.Entry<String,Map<String,?>> |
currentActivityCommand()
This method forms a
Map of parameters for the
getting of the current activity. |
static Map.Entry<String,Map<String,?>> |
endTestCoverageCommand(String intent,
String path)
This method forms a
Map of parameters for the
ending of the test coverage. |
static Map.Entry<String,Map<String,?>> |
getNetworkConnectionCommand()
This method forms a
Map of parameters for the
getting of a network connection value. |
static Map.Entry<String,Map<String,?>> |
isLockedCommand()
This method forms a
Map of parameters for the
checking of the device state (is it locked or not). |
static Map.Entry<String,Map<String,?>> |
lockDeviceCommand()
This method forms a
Map of parameters for the
device locking. |
static Map.Entry<String,Map<String,?>> |
longPressKeyCodeCommand(int key)
This method forms a
Map of parameters for the
long key event invocation. |
static Map.Entry<String,Map<String,?>> |
longPressKeyCodeCommand(int key,
Integer metastate)
This method forms a
Map of parameters for the
long key event invocation. |
static Map.Entry<String,Map<String,?>> |
openNotificationsCommand()
This method forms a
Map of parameters for the
notification opening. |
static Map.Entry<String,Map<String,?>> |
pressKeyCodeCommand(int key)
This method forms a
Map of parameters for the
key event invocation. |
static Map.Entry<String,Map<String,?>> |
pressKeyCodeCommand(int key,
Integer metastate)
This method forms a
Map of parameters for the
key event invocation. |
static Map.Entry<String,Map<String,?>> |
pushFileCommandCommand(String remotePath,
byte[] base64Data)
This method forms a
Map of parameters for the
file pushing |
static Map.Entry<String,Map<String,?>> |
replaceElementValueCommand(org.openqa.selenium.internal.HasIdentity hasIdentityObject,
String value)
This method forms a
Map of parameters for the element
value replacement. |
static Map.Entry<String,Map<String,?>> |
setConnectionCommand(Connection connection)
This method forms a
Map of parameters for the
setting of device network connection. |
static Map.Entry<String,Map<String,?>> |
startActivityCommand(String appPackage,
String appActivity,
String appWaitPackage,
String appWaitActivity,
String intentAction,
String intentCategory,
String intentFlags,
String optionalIntentArguments,
boolean stopApp)
This method forms a
Map of parameters for the
activity starting. |
static Map.Entry<String,Map<String,?>> |
toggleLocationServicesCommand()
This method forms a
Map of parameters for the
toggling of location services. |
static Map.Entry<String,Map<String,?>> |
unlockCommand()
This method forms a
Map of parameters for the
device unlocking. |
deleteC, getC, postC, prepareArguments, prepareArguments
public static Map.Entry<String,Map<String,?>> currentActivityCommand()
Map
of parameters for the
getting of the current activity.Map
command arguments.public static Map.Entry<String,Map<String,?>> endTestCoverageCommand(String intent, String path)
Map
of parameters for the
ending of the test coverage.intent
- intent to broadcast.path
- path to .ec file.Map
command arguments.public static Map.Entry<String,Map<String,?>> getNetworkConnectionCommand()
Map
of parameters for the
getting of a network connection value.Map
command arguments.public static Map.Entry<String,Map<String,?>> isLockedCommand()
Map
of parameters for the
checking of the device state (is it locked or not).Map
command arguments.public static Map.Entry<String,Map<String,?>> pressKeyCodeCommand(int key)
Map
of parameters for the
key event invocation.key
- code for the key pressed on the device.Map
command arguments.public static Map.Entry<String,Map<String,?>> pressKeyCodeCommand(int key, Integer metastate)
Map
of parameters for the
key event invocation.key
- code for the key pressed on the Android device.metastate
- metastate for the keypress.Map
command arguments.public static Map.Entry<String,Map<String,?>> longPressKeyCodeCommand(int key)
Map
of parameters for the
long key event invocation.key
- code for the long key pressed on the device.Map
command arguments.public static Map.Entry<String,Map<String,?>> longPressKeyCodeCommand(int key, Integer metastate)
Map
of parameters for the
long key event invocation.key
- code for the long key pressed on the Android device.metastate
- metastate for the long key press.Map
command arguments.public static Map.Entry<String,Map<String,?>> openNotificationsCommand()
Map
of parameters for the
notification opening.Map
command arguments.public static Map.Entry<String,Map<String,?>> pushFileCommandCommand(String remotePath, byte[] base64Data)
Map
of parameters for the
file pushingremotePath
- Path to file to write data to on remote devicebase64Data
- Base64 encoded byte array of data to write to remote deviceMap
command arguments.public static Map.Entry<String,Map<String,?>> setConnectionCommand(Connection connection)
Map
of parameters for the
setting of device network connection.connection
- The bitmask of the desired connectionMap
command arguments.public static Map.Entry<String,Map<String,?>> startActivityCommand(String appPackage, String appActivity, String appWaitPackage, String appWaitActivity, String intentAction, String intentCategory, String intentFlags, String optionalIntentArguments, boolean stopApp) throws IllegalArgumentException
Map
of parameters for the
activity starting.appPackage
- The package containing the activity. [Required]appActivity
- The activity to start. [Required]appWaitPackage
- Automation will begin after this package starts. [Optional]appWaitActivity
- Automation will begin after this activity starts. [Optional]intentAction
- Intent action which will be used to start activity [Optional]intentCategory
- Intent category which will be used to start activity [Optional]intentFlags
- Flags that will be used to start activity [Optional]optionalIntentArguments
- Additional intent arguments that will be used to
start activity [Optional]Map
command arguments.IllegalArgumentException
- when any required argument is emptypublic static Map.Entry<String,Map<String,?>> toggleLocationServicesCommand()
Map
of parameters for the
toggling of location services.Map
command arguments.public static Map.Entry<String,Map<String,?>> unlockCommand()
Map
of parameters for the
device unlocking.Map
command arguments.public static Map.Entry<String,Map<String,?>> lockDeviceCommand()
Map
of parameters for the
device locking.Map
command arguments.public static Map.Entry<String,Map<String,?>> replaceElementValueCommand(org.openqa.selenium.internal.HasIdentity hasIdentityObject, String value)
Map
of parameters for the element
value replacement. It is used against input elementshasIdentityObject
- an instance which contains an element IDvalue
- a new valueMap
command arguments.Copyright © 2016. All rights reserved.