public class AndroidMobileCommandHelper extends MobileCommand
ACTIVATE_APP, CLOSE_APP, commandRepository, COMPARE_IMAGES, CURRENT_ACTIVITY, END_TEST_COVERAGE, FINGER_PRINT, GET_CLIPBOARD, 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, GSM_CALL, GSM_SIGNAL, GSM_VOICE, HIDE_KEYBOARD, INSTALL_APP, IS_APP_INSTALLED, IS_KEYBOARD_SHOWN, IS_LOCKED, LAUNCH_APP, LOCK, LONG_PRESS_KEY_CODE, NETWORK_SPEED, OPEN_NOTIFICATIONS, PERFORM_MULTI_TOUCH, PERFORM_TOUCH_ACTION, POWER_AC_STATE, POWER_CAPACITY, PRESS_KEY_CODE, PULL_FILE, PULL_FOLDER, PUSH_FILE, QUERY_APP_STATE, REMOVE_APP, REPLACE_VALUE, RESET, RUN_APP_IN_BACKGROUND, SEND_SMS, SET_CLIPBOARD, SET_NETWORK_CONNECTION, SET_SETTINGS, SET_VALUE, SHAKE, START_ACTIVITY, START_RECORDING_SCREEN, STOP_RECORDING_SCREEN, TERMINATE_APP, TOGGLE_AIRPLANE_MODE, TOGGLE_DATA, TOGGLE_LOCATION_SERVICES, TOGGLE_WIFI, 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,?>> |
gsmCallCommand(java.lang.String phoneNumber,
GsmCallActions gsmCallActions)
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,?>> |
gsmSignalStrengthCommand(GsmSignalStrength gsmSignalStrength)
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,?>> |
gsmVoiceCommand(GsmVoiceState gsmVoiceState)
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,?>> |
isLockedCommand()
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,?>> |
networkSpeedCommand(NetworkSpeed networkSpeed)
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,?>> |
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,?>> |
powerACCommand(PowerACState powerACState)
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,?>> |
powerCapacityCommand(int percent)
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,?>> |
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,?>> |
sendSMSCommand(java.lang.String phoneNumber,
java.lang.String message)
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(long bitMask)
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,?>> |
toggleAirplaneCommand()
This method forms a
Map of parameters for the toggle airplane mode. |
static java.util.Map.Entry<java.lang.String,java.util.Map<java.lang.String,?>> |
toggleDataCommand()
This method forms a
Map of parameters for the toggle data. |
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,?>> |
toggleWifiCommand()
This method forms a
Map of parameters for the toggling of wifi. |
static java.util.Map.Entry<java.lang.String,java.util.Map<java.lang.String,?>> |
unlockCommand()
This method forms a
Map of parameters for the element. |
compareImagesCommand, deleteC, getC, getIsDeviceLockedCommand, getSettingsCommand, hideKeyboardCommand, hideKeyboardCommand, isKeyboardShownCommand, lockDeviceCommand, longPressKeyCodeCommand, longPressKeyCodeCommand, postC, prepareArguments, prepareArguments, pressKeyCodeCommand, pressKeyCodeCommand, pushFileCommand, setSettingsCommand, startRecordingScreenCommand, stopRecordingScreenCommand, unlockDeviceCommand
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,?>> isLockedCommand()
Map
of parameters for the
finger print authentication invocation.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(long bitMask)
Map
of parameters for the setting of device network connection.bitMask
- 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]stopApp
- Stop app on reset or notMap
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 element.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.public static java.util.Map.Entry<java.lang.String,java.util.Map<java.lang.String,?>> sendSMSCommand(java.lang.String phoneNumber, java.lang.String message)
Map
of parameters for the element
value replacement. It is used against input elementsphoneNumber
- The phone number of message sendermessage
- The message contentMap
command arguments.public static java.util.Map.Entry<java.lang.String,java.util.Map<java.lang.String,?>> gsmCallCommand(java.lang.String phoneNumber, GsmCallActions gsmCallActions)
Map
of parameters for the element
value replacement. It is used against input elementsphoneNumber
- The phone number of message sendergsmCallActions
- One of available GSM call actionsMap
command arguments.public static java.util.Map.Entry<java.lang.String,java.util.Map<java.lang.String,?>> gsmSignalStrengthCommand(GsmSignalStrength gsmSignalStrength)
Map
of parameters for the element
value replacement. It is used against input elementsgsmSignalStrength
- One of available GSM signal strengthMap
command arguments.public static java.util.Map.Entry<java.lang.String,java.util.Map<java.lang.String,?>> gsmVoiceCommand(GsmVoiceState gsmVoiceState)
Map
of parameters for the element
value replacement. It is used against input elementsgsmVoiceState
- One of available GSM voice stateMap
command arguments.public static java.util.Map.Entry<java.lang.String,java.util.Map<java.lang.String,?>> networkSpeedCommand(NetworkSpeed networkSpeed)
Map
of parameters for the element
value replacement. It is used against input elementsnetworkSpeed
- One of possible NETWORK_SPEED valuesMap
command arguments.public static java.util.Map.Entry<java.lang.String,java.util.Map<java.lang.String,?>> powerCapacityCommand(int percent)
Map
of parameters for the element
value replacement. It is used against input elementspercent
- A number in range [0, 4]Map
command arguments.public static java.util.Map.Entry<java.lang.String,java.util.Map<java.lang.String,?>> powerACCommand(PowerACState powerACState)
Map
of parameters for the element
value replacement. It is used against input elementspowerACState
- One of available power AC stateMap
command arguments.public static java.util.Map.Entry<java.lang.String,java.util.Map<java.lang.String,?>> toggleWifiCommand()
Map
of parameters for the toggling of wifi.Map
command arguments.public static java.util.Map.Entry<java.lang.String,java.util.Map<java.lang.String,?>> toggleAirplaneCommand()
Map
of parameters for the toggle airplane mode.Map
command arguments.public static java.util.Map.Entry<java.lang.String,java.util.Map<java.lang.String,?>> toggleDataCommand()
Map
of parameters for the toggle data.Map
command arguments.