The requested page is not available for selected version.
execute mobile command
Description
Execute a mobile command-line and return its output.
Arguments
command
Command to be executed.
argument
(Optional) Define an argument using the JSON serializable for the current action definition.
variable
(Optional) Variable to receive the command output.
Valid contexts
This action may be used within the following project items: test modules and user-defined actions.
Applicable Systems/Platforms
Use of this action is supported on the following systems/platforms: Mobile operating systems.
Notes
- This built-in action is supported only on Windows test controllers; it is effective on mobile devices test platforms.
- The execute mobile command action can be invoked to execute any commands that are supported by Appium. (For further details, refer to the Help topic for this action in docs. (Note that in Android, when using the ‘mobile:shell’ command, adb shell requires permission to execute on the device. Additionally, the script must be wrapped with the argument
command
. For example, to list all packages, the argument would be{'command': 'pm list packages'}
.). Learn more example bellow.
Applicable Built-In Settings
The following settings are applicable to this action: case sensitive, remove double quotes from cells, standard ASCII only, object wait, window wait.
Example
Suppose you may want to issue two commands in your automation script.
- One command is to launch an application, such as MapsActivity.
- The other is to return information relating to the current mobile device.
Test Lines
Result