public class AndroidMobileCommandHelper extends MobileCommand
CLOSE_APP, commandRepository, CURRENT_ACTIVITY, END_TEST_COVERAGE, FINGER_PRINT, GET_CURRENT_PACKAGE, GET_DEVICE_TIME, GET_DISPLAY_DENSITY, GET_NETWORK_CONNECTION, GET_PERFORMANCE_DATA, GET_SESSION, GET_SETTINGS, GET_STRINGS, GET_SUPPORTED_PERFORMANCE_DATA_TYPES, GET_SYSTEM_BARS, HIDE_KEYBOARD, INSTALL_APP, IS_APP_INSTALLED, IS_KEYBOARD_SHOWN, 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, TOUCH_ID, TOUCH_ID_ENROLLMENT, UNLOCK
Constructor and Description |
---|
AndroidMobileCommandHelper() |
Modifier and Type | Method and Description |
---|---|
static java.util.Map.Entry<java.lang.String,java.util.Map<java.lang.String,?>> |
currentActivityCommand()
This method forms a
Map of parameters for the
getting of the current activity. |
static java.util.Map.Entry<java.lang.String,java.util.Map<java.lang.String,?>> |
currentPackageCommand()
This method forms a
Map of parameters for the
getting of the current package. |
static java.util.Map.Entry<java.lang.String,java.util.Map<java.lang.String,?>> |
endTestCoverageCommand(java.lang.String intent,
java.lang.String path)
This method forms a
Map of parameters for the
ending of the test coverage. |
static java.util.Map.Entry<java.lang.String,java.util.Map<java.lang.String,?>> |
fingerPrintCommand(int fingerPrintId)
This method forms a
Map of parameters for the
finger print authentication invocation. |
static java.util.Map.Entry<java.lang.String,java.util.Map<java.lang.String,?>> |
getDisplayDensityCommand()
This method forms a
Map of parameters to
Retrieve the display density of the Android device. |
static java.util.Map.Entry<java.lang.String,java.util.Map<java.lang.String,?>> |
getNetworkConnectionCommand()
This method forms a
Map of parameters for the
getting of a network connection value. |
static java.util.Map.Entry<java.lang.String,java.util.Map<java.lang.String,?>> |
getPerformanceDataCommand(java.lang.String packageName,
java.lang.String dataType,
int dataReadTimeout)
returns the resource usage information of the application. the resource is one of the system state
which means cpu, memory, network traffic, and battery.
|
static java.util.Map.Entry<java.lang.String,java.util.Map<java.lang.String,?>> |
getSupportedPerformanceDataTypesCommand()
returns the information type of the system state which is supported to read
as like cpu, memory, network traffic, and battery.
|
static java.util.Map.Entry<java.lang.String,java.util.Map<java.lang.String,?>> |
getSystemBarsCommand()
This method forms a
Map of parameters to
Retrieve visibility and bounds information of the status and navigation bars. |
static java.util.Map.Entry<java.lang.String,java.util.Map<java.lang.String,?>> |
isKeyboardShownCommand()
This method forms a
Map of parameters for the
checking of the keyboard state (is it shown or not). |
static java.util.Map.Entry<java.lang.String,java.util.Map<java.lang.String,?>> |
isLockedCommand()
This method forms a
Map of parameters for the
checking of the device state (is it locked or not). |
static java.util.Map.Entry<java.lang.String,java.util.Map<java.lang.String,?>> |
openNotificationsCommand()
This method forms a
Map of parameters for the
notification opening. |
static java.util.Map.Entry<java.lang.String,java.util.Map<java.lang.String,?>> |
replaceElementValueCommand(org.openqa.selenium.internal.HasIdentity hasIdentityObject,
java.lang.String value)
This method forms a
Map of parameters for the element
value replacement. |
static java.util.Map.Entry<java.lang.String,java.util.Map<java.lang.String,?>> |
setConnectionCommand(Connection connection)
This method forms a
Map of parameters for the
setting of device network connection. |
static java.util.Map.Entry<java.lang.String,java.util.Map<java.lang.String,?>> |
startActivityCommand(java.lang.String appPackage,
java.lang.String appActivity,
java.lang.String appWaitPackage,
java.lang.String appWaitActivity,
java.lang.String intentAction,
java.lang.String intentCategory,
java.lang.String intentFlags,
java.lang.String optionalIntentArguments,
boolean stopApp)
This method forms a
Map of parameters for the
activity starting. |
static java.util.Map.Entry<java.lang.String,java.util.Map<java.lang.String,?>> |
toggleLocationServicesCommand()
This method forms a
Map of parameters for the
toggling of location services. |
static java.util.Map.Entry<java.lang.String,java.util.Map<java.lang.String,?>> |
unlockCommand()
This method forms a
Map of parameters for the
device unlocking. |
deleteC, getC, getSettingsCommand, hideKeyboardCommand, hideKeyboardCommand, lockDeviceCommand, longPressKeyCodeCommand, longPressKeyCodeCommand, postC, prepareArguments, prepareArguments, pressKeyCodeCommand, pressKeyCodeCommand, pushFileCommand, setSettingsCommand
public static java.util.Map.Entry<java.lang.String,java.util.Map<java.lang.String,?>> currentActivityCommand()
Map
of parameters for the
getting of the current activity.Map
command arguments.public static java.util.Map.Entry<java.lang.String,java.util.Map<java.lang.String,?>> currentPackageCommand()
Map
of parameters for the
getting of the current package.Map
command arguments.public static java.util.Map.Entry<java.lang.String,java.util.Map<java.lang.String,?>> endTestCoverageCommand(java.lang.String intent, java.lang.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 java.util.Map.Entry<java.lang.String,java.util.Map<java.lang.String,?>> getSupportedPerformanceDataTypesCommand()
public static java.util.Map.Entry<java.lang.String,java.util.Map<java.lang.String,?>> getPerformanceDataCommand(java.lang.String packageName, java.lang.String dataType, int dataReadTimeout) throws java.lang.Exception
packageName
- the package name of the applicationdataType
- the type of system state which wants to read.
It should be one of the supported performance data types,
the return value of the function "getSupportedPerformanceDataTypes"dataReadTimeout
- the number of attempts to readjava.lang.Exception
- if the performance data type is not supported, thows Errorpublic static java.util.Map.Entry<java.lang.String,java.util.Map<java.lang.String,?>> getDisplayDensityCommand()
Map
of parameters to
Retrieve the display density of the Android device.Map
command arguments.public static java.util.Map.Entry<java.lang.String,java.util.Map<java.lang.String,?>> getNetworkConnectionCommand()
Map
of parameters for the
getting of a network connection value.Map
command arguments.public static java.util.Map.Entry<java.lang.String,java.util.Map<java.lang.String,?>> getSystemBarsCommand()
Map
of parameters to
Retrieve visibility and bounds information of the status and navigation bars.Map
command arguments.public static java.util.Map.Entry<java.lang.String,java.util.Map<java.lang.String,?>> isKeyboardShownCommand()
Map
of parameters for the
checking of the keyboard state (is it shown or not).Map
command arguments.public static java.util.Map.Entry<java.lang.String,java.util.Map<java.lang.String,?>> isLockedCommand()
Map
of parameters for the
checking of the device state (is it locked or not).Map
command arguments.public static java.util.Map.Entry<java.lang.String,java.util.Map<java.lang.String,?>> fingerPrintCommand(int fingerPrintId)
Map
of parameters for the
finger print authentication invocation.fingerPrintId
- finger prints stored in Android Keystore system (from 1 to 10)Map
command arguments.public static java.util.Map.Entry<java.lang.String,java.util.Map<java.lang.String,?>> openNotificationsCommand()
Map
of parameters for the
notification opening.Map
command arguments.public static java.util.Map.Entry<java.lang.String,java.util.Map<java.lang.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 java.util.Map.Entry<java.lang.String,java.util.Map<java.lang.String,?>> startActivityCommand(java.lang.String appPackage, java.lang.String appActivity, java.lang.String appWaitPackage, java.lang.String appWaitActivity, java.lang.String intentAction, java.lang.String intentCategory, java.lang.String intentFlags, java.lang.String optionalIntentArguments, boolean stopApp) throws java.lang.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.java.lang.IllegalArgumentException
- when any required argument is emptypublic static java.util.Map.Entry<java.lang.String,java.util.Map<java.lang.String,?>> toggleLocationServicesCommand()
Map
of parameters for the
toggling of location services.Map
command arguments.public static java.util.Map.Entry<java.lang.String,java.util.Map<java.lang.String,?>> unlockCommand()
Map
of parameters for the
device unlocking.Map
command arguments.public static java.util.Map.Entry<java.lang.String,java.util.Map<java.lang.String,?>> replaceElementValueCommand(org.openqa.selenium.internal.HasIdentity hasIdentityObject, java.lang.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.