Mobile modules
The technology-specific modules for mobile perform specific tasks for the mobile technology.
Add Desired Capabilities
Desired Capabilities let you define key parameters that control the behavior of your test sessions in Appium. These settings instruct the Appium Server on how to execute your tests.
The Add Desired Capabilities module allows you to add new capabilities to your test execution, without overriding the ones you've already configured. To ensure correct execution, you must place this module as the first test step in your test case.
Value |
Description |
---|---|
Capability |
Specify which Desired Capability you want to apply:
Note that names and values are case-sensitive. |
Android Snackbar
Steers snackbar in Android applications.
Value |
Description |
---|---|
Text |
Text that appears on the snackbar. |
Action |
If the snackbar contains a button, specify the action you want to perform on it. |
Click On Screen
Performs a tap gesture on a specific point of the mobile device screen.
Value |
Description |
---|---|
X |
Horizontal click position. Specify the x-coordinate either in percent or pixels:
|
Y |
Vertical click position. Specify the y-coordinate either in percent or pixels:
|
Download File from Mobile Device
Downloads a file from an Android device to a computer. If the file already exists on the computer, the system overwrites it.
Value |
Description |
---|---|
Mobile Device Path |
Full path to the file that you want to upload, including the file name and extension. Use forward slashes (/) in the path. Example: /sdcard/Download/abc.pdf On Samsung devices, replace Internal Storage with sdcard in the file path. For example, replace /Internal storage/Download/abc.txt with /sdcard/Download/abc.txt. |
Desktop Path |
Full path to the location where you want to save the file, including the file name and extension. Example: D:\abc.pdf You can specify a different name for your file. |
Draw on Screen
Draws a shape directly on the screen.
Value |
Description |
---|---|
Long Tap |
Specify whether you want to start the drawing with a tap or a long tap. Possible values are:
|
Duration |
Optionally, specify the duration of the movement in milliseconds. A higher value makes the movement slower and shorter. A lower value makes the movement faster and longer. The default value is 300 ms. |
Point->X |
Specify the start x-coordinate in percent. The leftmost value is 0 and the rightmost value is 100. |
Point->Y |
Specify the start y-coordinate in percent. The top value is 0 and the bottom value is 100. |
End Appium Session
Each time you connect to a mobile device, Appium starts a new session. To keep things running smoothly and avoid any leftover data or issues, just add the End Appium Session module after the last TestStep you want in that session.
Execute Driver Script
Bundles many commands from a JavaScript and execute them all at once on the Appium server. The Appium server executes this code in the current session and returns all the values specified in the script. For more information on writing the JavaScript code, see the Appium documentation execute-driver-plugin (opens in new tab) and WebdriverIO (opens in new tab).
Value |
Description |
---|---|
Driver Script from File |
Name of the JavaScript file stored on the device running Tosca Cloud. You must specify either a Driver Script from File or an Inline Driver Script value. |
Inline Driver Script |
Enter the driver script as test step value. You must specify either a Driver Script from File or an Inline Driver Script value. |
Result |
Returns all the values specified by the script. |
Get Appium Session ID
Saves the Appium session ID to a buffer.
Value |
Description |
---|---|
Buffer Name |
Name of the buffer to which you want to save the ID of your current Appium session. |
Handle Perfecto Image Injection
Starts or stops the image injection process when you run tests on Perfecto.
Value |
Description |
---|---|
Operation |
Specify if you want to start or stop the image injection process. |
Repository file |
Name of the Perfecto repository file with specific prefix, foe example PUBLIC:. |
Application ID |
Identifier of the application (BundleID for iOS or PackageName for Android). |
ME3.0 Hardware Button Operations
Steers the following platform-specific hardware buttons:
-
Home button for iOS and Android
-
Back button on Android
-
App Selection button on Android
Value |
Description |
---|---|
Button |
Button you want to click. Possible values are:
|
ME3.0 Set Device Orientation
Defines whether to steer your device in portrait or landscape orientation.
Value |
Description |
---|---|
Orientation |
Orientation of your device. Use action mode Select. The following values are available:
|
Open Mobile App
Opens native and hybrid mobile applications on your Android or iOS device.
Value |
Description |
---|---|
Application |
For Android devices and emulators, specify the full path or PackageName and Activity of the application you want to steer. Separate the PackageName from the Activity with a forward slash (/). However, we recommend that you use AppPackage and AppActivity. For iOS devices and simulators, specify the full path or BundleID of the application you want to steer. However, we recommend that you use BundleID. |
BundleID |
For iOS devices and simulators, specify the BundleID of the application you want to steer. |
AppPackage |
For Android devices and emulators, specify the PackageName of the application you want to steer. |
AppActivity |
For Android devices and emulators, specify the Activity of the application you want to steer. |
Application Path |
For devices connected to Tricentis Mobile Agent, specify the full path of the application you want to steer. |
Open Mobile Connection
Opens a connection to a mobile device through Appium
Value |
Description |
---|---|
Connection |
Name or ID of the mobile connection you want to use. |
Capability Set |
Name or ID of a capability set of this connection. |
Capability Overwrites |
Custom values to override specific values defined in the Capability set. |
Send Text Input to Focused Control
Sends text input to a focused control to simulate user action.
Value |
Description |
---|---|
Text |
Text input you want to send to a focused control. |
Set Autohide Keyboard
Disables the auto-hide mode for keyboards in native applications. This impacts the performance of steering text boxes.
Value |
Description |
---|---|
Autohide Keyboard |
Specify whether you want to enable the auto-hide mode of the iOS onscreen keyboard. Possible values are:
|
Set Desired Capabilities
Allows you to indicate important parameters. These parameters tell the Appium Server how you want your test sessions to behave. It has to be the first test step of your test case.
Value |
Description |
---|---|
Capability |
Specify which Desired Capability you want to apply:
Names and values are case-sensitive. |
Set iOS biometrics enrollment
Allows you to enable or disable FaceID or TouchID user authentication on your iOS simulator.
Value |
Description |
---|---|
State |
Enable or disable the biometrics enrollment on your iOS simulator. Possible values are:
|
Swipe On Screen
Performs a swipe operation directly on the screen. The length of the swipe movement is equal to one-third of the mobile screen size.
Value |
Description |
---|---|
Direction |
Type of swipe you want to perform. Possible values are:
|
Duration |
Duration of the swipe in milliseconds. A higher value makes the swipe slower and shorter. A lower value makes the swipe faster and longer. The default value is 300 ms. |
Start Point |
Define the start coordinates of the swipe. You can specify different coordinates. If you specify one coordinate, you also have to enter a value for the other. Note that if you don't specify a start point, the default for the swipe movement is at 10% from the screen edge opposite to the swipe direction. For example, if you set the direction to SWIPEUP, the movement starts 10% from the bottom edge. |
Start Point->X |
Specify the x-coordinate either in percent or pixels: For a percentage of the screen, enter a positive integer from 0 (left) to 100 (right). For example, 50 or 50%. For pixels, enter a positive integer from 0 (left) to the maximum screen resolution with the suffix px. For example, 250px. |
Start Point->Y |
Specify the y-coordinate either in percent or pixels: For a percentage of the screen, enter a positive integer from 0 (top) to 100 (bottom). For example, 50 or 50%. For pixels, enter a positive integer from 0 (top) to the maximum screen resolution with the suffix px. For example, 250px. |
End Point |
Define the end coordinates of the swipe. If you enter end coordinates, set the Direction to SWIPE. If you specify one coordinate, you also have to enter a value for the other. Note that if you don't specify an end point, the default for the swipe movement is the center of the screen. For example, if you set the direction to SWIPE with a start point at coordinates 90% (x) and 10% (y), the movement starts in the upper right corner and ends with a vertical swipe at the center of the screen with coordinates 90% (x) and 50% (y). |
End Point->X |
Specify the x-coordinate either in percent or pixels: For a percentage of the screen, enter a positive integer from 0 (left) to 100 (right). For example, 50 or 50%. For pixels, enter a positive integer from 0 (left) to the maximum screen resolution with the suffix px. For example, 250px. |
End Point->Y |
Specify the y-coordinate either in percent or pixels: For a percentage of the screen, enter a positive integer from 0 (top) to 100 (bottom). For example, 50 or 50%. For pixels, enter a positive integer from 0 (top) to the maximum screen resolution with the suffix px. For example, 250px. |
Switch Mobile App
Switches to a different mobile application during a single test case.
Value |
Description |
---|---|
Application |
Application to which you want to switch:
|
Upload File to Mobile Device
Uploads a file from a computer to an Android device. If the file already exists on the Android device, the system overwrites it.
Value |
Description |
---|---|
Desktop Path |
Full path to the file that you want to upload, including the file name and extension. For example: D:\abc.pdf |
Mobile Device Path |
Full path to the location where you want to save the file, including the file name and extension. Use forward slashes (/) in the path. For example: /sdcard/Download/abc.pdf You can specify a different name for your file. On Samsung devices, replace Internal Storage with sdcard in the file path. For example, replace /Internal storage/Download/abc.txt with /sdcard/Download/abc.txt. |
Upload File to Perfecto
Uploads a file to the Perfecto repository.
Value |
Description |
---|---|
Perfecto token |
Perfecto security token. |
File path |
Full path to the file in the format .File=<path_to_file>. |
Endpoint |
Perfecto repository REST API endpoint. For example: https://<your_host>.perfectomobile.com/services/repositories/media/ |
Destination path |
Name of the Perfecto destination repository file with specific prefix, for example PUBLIC:. |
Overwrite file |
Overwrites the existing file. Enter True. |
Use Android fingerprint authentication
Uses fingerprint authentication on your Android emulator. To use this module in your test case, you have to configure fingerprint ID(s) on your Android emulator first.
Value |
Description |
---|---|
FingerprintId |
Enter the fingerprint ID that you configured on your emulator and want to use for user authentication. |
Use iOS biometric authentication
Uses FaceID or TouchID user authentication on your iOS simulator.
Value |
Description |
---|---|
Type of biometric authentication |
Specify what type of biometric authentication you want to use. Possible values are:
|
Positive authentication |
Specify whether the authentication is positive or negative. Possible values are:
|
Use Perfecto biometrics authentication
Performs biometrics user authentication on Perfecto cloud devices.
Value |
Description |
---|---|
Application ID |
Identifier of the application (BundleID for iOS or PackageName for Android). This value is mandatory. |
Authentication positive |
Specify whether the authentication is positive or negative. This value is mandatory. |
Error type |
Optionally, select the error type related to unsuccessful authentication. |