Mobile.CloseApp
This action closes the specified application or mobile browser.
This action does not have any parameter.
Example:
Mobile.CloseApp
SwitchWebExecutionPlatform
This action changes the current Web execution platform from Desktop to Mobile or from Mobile to Desktop. When used, web application test case will run on specified platform.
Input Parameters:
Parameter Name | Parameter Description | Mandatory | Data Type |
---|---|---|---|
Platform | Platform to run web application on. Supported platforms are "Desktop" and "Mobile". | Yes | String |
Example:
SwitchWebExecutionPlatform "Mobile"
Mobile.PressBackButton
This action taps back button on the Mobile device.
This action is supported for Android only. For iOS try using the Swipe action on required object(s).
This action does not have any parameter.
Example:
Mobile.PressBackButton
Mobile.StoreWebViewHandle
This action stores the web view handle under the specified key. The key value can be retrieved using the key name.
Input Parameters:
ParameterName | Parameter Description | Mandatory | Data Type |
---|---|---|---|
key | Enter the key under which you want to store the web view handle. | Yes | String |
Example:
Mobile.StoreWebViewHandle "Key"
Mobile.SelectWebView
This action selects the web view present in the current page hybrid app. If key is provided (by using StoreWebViewHandle action), system selects the webview specified in key. If key is not provided, default webview will be selected.
Input Parameters:
Parameter Name | Parameter Description | Mandatory | Data Type |
---|---|---|---|
Key | enter the key used in the action "StoreWebViewHandle". | No | String |
Example:
Mobile.SelectWebView "Key"
Mobile.SelectNativeContext
This action can be used to select native context from the hybrid app.
This action does not have any parameter.
Example:
Mobile.SelectNativeContext
Mobile.SelectWebViewUsingURL
This action selects the web view using the URL or pattern specified in the parameters.
Input Parameters:
ParameterName | Parameter Description | Mandatory | Data Type |
---|---|---|---|
URL | Enter the URL to open. | Yes | String |
URL Pattern | Specify whether the URL is patterned or not. | No | Boolean |
Example:
Mobile.SelectWebviewUsingURL "www.google.com" "False"
Mobile.PressKeys
This action presses the specified keys using the mobile keyboard.
This action can be used when working with Android applications.
Input Parameters:
Parameter Name | Parameter Description | Mandatory | Data Type |
---|---|---|---|
keyName | Enter the key to be pressed. For more information, click here. | Yes | String |
modifierKeyName | Enter Modifier (Meta State) key to press. Generally used for combination of keys such as Shift, Ctrl, and so on. For more information, click here. | No | String |
Example:
Mobile.PressKeys "KEYCODE_F"
Mobile.PressKeys "KEYCODE_CTRL_LEFT"
Mobile.HideKeyboard
This action hides the keyboard if present on the screen.
Parameters mentioned below are applicable for iOS only.
For Android, parameters are not required and ignored if provided.
Input Parameters:
ParameterName | Parameter Description | Mandatory | Data Type |
---|---|---|---|
Strategy | Enter the strategy to hide the keyboard. Value for this parameter can be PRESS_KEY and TAP_OUTSIDE. | Yes | String |
KeyName | Enter the text that is displayed on the button of the keyboard you want to press to hide keyboard. | Yes | String |
Example:
Mobile.HideKeyboard "Tap_Outside" "Done"
Mobile.Swipe
This action performs swipe based on the coordinates provided in the parameters.
Input Parameters:
ParameterName | Parameter Description | Mandatory | Data Type |
---|---|---|---|
startX | Enter the starting point in x-axis from where you want to start the swipe. | Yes | String |
startY | Enter the starting point in y-axis from where you want to start the swipe. | Yes | String |
endX | Enter the starting point in x-axis from where you want to stop the swipe. | Yes | String |
endY | Enter the starting point in y-axis from where you want to stop the swipe. | Yes | String |
duration | Enter the duration seconds for the action to perform | No | String |
Example:
Mobile.Swipe "100" "123" "145" "121" "1"