Port IMAGE - DEFAULT¶
Default port for interaction with Android devices.
Stimulation¶
This port has no stimulus capabilities.
Properties 🛈¶
Name |
Available if |
Default value |
Valid values |
Type |
Description |
|---|---|---|---|---|---|
Device |
[<auto>, <manual>, <online query>] |
string |
Device that will be connected to the Tool Server. |
||
Device ID or network address |
Device: ‘<manual>’ |
string |
Device ID or IP/hostname and port of the device, e.g. “emulator-5554” or “192.168.100:10:37775”. If there is no port given, the default port 5555 will be used. |
||
Display Id |
‘<auto>’ |
string |
The image port will interact with the given display when reading images. You can list the available display Ids with the adb command “adb shell dumpsys SurfaceFlinger –display-id”. With the option “<auto>” the default display will be used. |
||
Display Id ❲HWC❳ |
‘<auto>’ |
string |
The Hardware Composer (HWC) Id of the target display. This is required for performing touch actions on a specific display. You can list the available Ids with the command “adb shell dumpsys SurfaceFlinger –display-id”. With the option “<auto>” the default display will be used. |
||
Live preview |
☐ |
bool |
Streams a live preview on the configured network port. The live stream is available under the toolhost’s IP address and the configured port, e.g. for a local tool connection: http://127.0.0.1:<port> |
||
Open preview window |
Live preview |
☑ |
bool |
Opens a preview window upon loading the configuration. This window displays the current output of the image source as a livestream and will remain open as long as the test configuration is active. |
|
Port |
Live preview |
‘<auto>’ |
string |
The network port that will be used for live streaming. Every live stream needs an unique port if live streaming is enabled for multiple video sources. If the value is set to <auto> a free network port will be defined by the system. |
|
Show text overlay in video recordings |
☐ |
bool |
Adds a text overlay with the format “timestamp package name” in the bottom left corner of video recordings. |
Jobs 🛈¶
ClearAndroidPackageData¶
Deletes user data for the given package.
Parameterization
Parameter
Name |
Available if |
Default value |
Valid values |
Type |
Description |
|---|---|---|---|---|---|
packageName |
string |
Package name of the installed app, e.g. “com.google.android.youtube”. |
ExecuteShellCommand¶
Executes a shell command on the device and returns the result. The shell and all child processes are terminated afterward.
Parameterization
Parameter
Name |
Available if |
Default value |
Valid values |
Type |
Description |
|---|---|---|---|---|---|
cmd |
string |
Shell command, e.g. “input tap 0 0”. |
|||
timeout |
0 |
int |
Timeout in seconds. |
Return value
Name |
Available if |
Default value |
Valid values |
Type |
Description |
|---|---|---|---|---|---|
result |
string |
Return value of the command. |
GetCurrentActivity¶
Returns the currently active package and activity.
Parameterization
Return value
Name |
Available if |
Default value |
Valid values |
Type |
Description |
|---|---|---|---|---|---|
result |
string |
The currently active package resp. activity. |
GetCurrentApp¶
Returns the name of the currently active app, e.g. “Chrome”.
Parameterization
Return value
Name |
Available if |
Default value |
Valid values |
Type |
Description |
|---|---|---|---|---|---|
result |
string |
Currently active app. |
GetInstalledApps¶
Returns a list of all installed apps.
Parameterization
Return value
Name |
Available if |
Default value |
Valid values |
Type |
Description |
|---|---|---|---|---|---|
result |
object |
List of all installed apps. |
InputText¶
Types the given text and presses enter to confirm the input if option is set.
Parameterization
Parameter
Name |
Available if |
Default value |
Valid values |
Type |
Description |
|---|---|---|---|---|---|
pressReturn |
☐ |
bool |
If True, Enter is pressed after the input. |
||
text |
string |
Text that will be typed. |
PressHardwareButton¶
Simulates pressing a hardware button.
Parameterization
Parameter
Name |
Available if |
Default value |
Valid values |
Type |
Description |
|---|---|---|---|---|---|
key |
‘KEYCODE_HOME’ |
[‘KEYCODE_HOME’, ‘KEYCODE_BACK’, ‘KEYCODE_APP_SWITCH’] |
string |
Name of the hardware button that will be pressed or any other key event. Available key events are listet at https://developer.android.com/reference/android/view/KeyEvent. |
|
pushDuration |
‘short’ |
[‘short’, ‘long’] |
string |
Duration of the keypress. |
PullFile¶
Downloads a file or directory from the Android device.
Parameterization
Parameter
Name |
Available if |
Default value |
Valid values |
Type |
Description |
|---|---|---|---|---|---|
localFilePath |
string |
Local path of the file or directory on the test computer. If empty, the resource will be saved in the report directory. |
|||
remoteFilePath |
string |
Path of a file or directory on the Android device, e.g. “/sdcard/Download/filename.ext” or “/sdcard/Download/dirname”. |
Return value
Name |
Available if |
Default value |
Valid values |
Type |
Description |
|---|---|---|---|---|---|
localFilePath |
string |
The local destination path for the downloaded file or directory. |
PushFile¶
Uploads a local file or directory to the Android device.
Parameterization
Parameter
Name |
Available if |
Default value |
Valid values |
Type |
Description |
|---|---|---|---|---|---|
localFilePath |
string |
Local path of a file or directory on the computer. |
|||
remoteFilePath |
string |
Path of the file or directory on the Android device, e.g. “/sdcard/Download/filename.ext” or “/sdcard/Download/dirname”. |
ShellSessionClose¶
Closes the shell session with the given Id and terminates all child processes.
Parameterization
Parameter
Name |
Available if |
Default value |
Valid values |
Type |
Description |
|---|---|---|---|---|---|
shellId |
string |
Id of the shell session that will be used. If the session does not exist, an exception will be thrown. |
ShellSessionExecuteCommand¶
Clears stdout and stderr, writes a command to the stdin stream of the shell session, reads the output streams and returns the output buffer.
Parameterization
Parameter
Name |
Available if |
Default value |
Valid values |
Type |
Description |
|---|---|---|---|---|---|
cmd |
string |
Command that will be executed, e.g. “ls -l” to list the current directory or “echo ${?}” to get the last return code. |
|||
cmdTimeout |
10 |
float |
The command timeout is measured in seconds. It stops reading from stdout and stderr when this takes longer than the given timeout.If the timeout is 0 or smaller, it will be ignored. |
||
perLineTimeout |
5 |
float |
The per line timeout is measured in seconds. It stops reading from stdout or stderr when reading a single line takes longer than the timeout. If the timeout is 0 or smaller, it will be ignored. |
||
shellId |
string |
Id of the shell session that will be used. If the session does not exist, an exception will be thrown. |
Return value
Name |
Available if |
Default value |
Valid values |
Type |
Description |
|---|---|---|---|---|---|
result |
object |
Returns a tuple with the received data from stdout and stderr streams. The data might be incomplete if one of the timeouts was reached. |
ShellSessionOpen¶
Creates a new ADB shell session that can be queried with read/write jobs.
Parameterization
Parameter
Name |
Available if |
Default value |
Valid values |
Type |
Description |
|---|---|---|---|---|---|
shellId |
string |
Id of the shell session that will be created. The Id is needed for read/write/close actions on this shell. If empty, an Id will be generated. |
Return value
Name |
Available if |
Default value |
Valid values |
Type |
Description |
|---|---|---|---|---|---|
result |
string |
Returns the given or created shell session Id. |
ShellSessionRead¶
Reads stdout or stderr stream and returns the data.
Parameterization
Parameter
Name |
Available if |
Default value |
Valid values |
Type |
Description |
|---|---|---|---|---|---|
perLineTimeout |
5 |
float |
The per line timeout is measured in seconds. It stops reading from stdout or stderr when reading a single line takes longer than the timeout. If the timeout is 0 or smaller, it will be ignored. |
||
shellId |
string |
Id of the shell session that will be used. If the session does not exist, an exception will be thrown. |
|||
stderr |
☐ |
bool |
Reads and returns the stderr stream instead of stdout. |
ShellSessionWrite¶
Writes to the stdin stream of the shell session.
Parameterization
Parameter
Name |
Available if |
Default value |
Valid values |
Type |
Description |
|---|---|---|---|---|---|
cmd |
string |
Input that will be sent to the stdin stream. |
|||
newLine |
☑ |
bool |
Adds the newline character “\n” at the end of the input to simulate the Enter key. |
||
shellId |
string |
Id of the shell session that will be used. If the session does not exist, an exception will be thrown. |
StartAndroidPackage¶
Starts the given activity of a package.
Parameterization
Parameter
Name |
Available if |
Default value |
Valid values |
Type |
Description |
|---|---|---|---|---|---|
activityName |
string |
App activity, e.g. “/.HomeActivity”. |
|||
packageName |
string |
Package name of the installed app, e.g. “com.google.android.youtube”. |
StartApp¶
Starts the given app.
Parameterization
Parameter
Name |
Available if |
Default value |
Valid values |
Type |
Description |
|---|---|---|---|---|---|
appName |
string |
Name of the app that will be started, e.g. “Chrome”. |
Return value
Name |
Available if |
Default value |
Valid values |
Type |
Description |
|---|---|---|---|---|---|
result |
string |
The package path of the started Android app. |
StopAndroidPackage¶
Closes the given package.
Parameterization
Parameter
Name |
Available if |
Default value |
Valid values |
Type |
Description |
|---|---|---|---|---|---|
packageName |
string |
Package name of the installed app, e.g. “com.google.android.youtube”. |
StopApp¶
Closes an app.
Parameterization
Parameter
Name |
Available if |
Default value |
Valid values |
Type |
Description |
|---|---|---|---|---|---|
appName |
string |
Name of the app that will be closed, e.g. “Chrome”. |
SwipeOnScreen¶
Simulates a swipe input on the device.
Parameterization
Parameter
Name |
Available if |
Default value |
Valid values |
Type |
Description |
|---|---|---|---|---|---|
duration |
0 |
int |
Duration of a swipe input in milliseconds. |
||
startPosX |
0 |
int |
Pixel position (x axis) |
||
startPosY |
0 |
int |
Pixel position (y axis) |
||
targetPosX |
0 |
int |
Pixel position (x axis) |
||
targetPosY |
0 |
int |
Pixel position (y axis) |
TouchOnScreen¶
Simulates a touch input on the device.
Parameterization
Parameter
Name |
Available if |
Default value |
Valid values |
Type |
Description |
|---|---|---|---|---|---|
duration |
0 |
int |
Holding time in milliseconds |
||
positionX |
0 |
int |
Pixel position (x axis) |
||
positionY |
0 |
int |
Pixel position (y axis) |