1. Mobile_GetObjectHeight
This keyword returns the Height value of the specified object. This keyword is used in a situation where the user wants to know The Height of the Object.
Example
If you want to get the Height value of an object, here is how you will use this keyword –
Use Mobile_LaunchAndroidApplication and Give the Device name and application Name Respectively in the Data Input Argument.
Use the Keyword Mobile_GetObjectHeight To Find the Height of Astro ID Text Box.
Map the object from OR to get the object height.
Test Object
Test Object Required? | Description |
Yes | This Keyword takes one object input argument. You can choose web element whose value you want to get from your Object Repository Tip: You can use OpKey Spy to add web element to Object Repository |
Input Data
Input Data Required? | Description |
No | This keyword does not require any Input data argument. . |
Output Data
Condition | Output value |
If the keyword passes successfully | Returns Object Height Value |
if there is an error | Blank
|
Error conditions
Scenarios | Error Message | Debug Information |
No text present
| No text found
|
|
2. Mobile_GetObjectWidth
This keyword returns the width value of the specified object. This keyword is used in a situation where the user wants to know The Width of the Object.
Example
If you want to get the Height value of an object, here is how you will use this keyword –
Test Object
Test Object Required? | Description |
Yes | This Keyword takes one object input argument. You can choose web element whose value you want to get from your Object Repository Tip: You can use OpKey Spy to add web element to Object Repository |
Input Data
Input Data Required? | Description |
No | This keyword does not require any Input data argument. . |
Output Data
Condition | Output value |
If the keyword passes successfully | Returns Object Width Value |
if there is an error | Blank
|
Error conditions
Conditions | Error Message | Debug Information |
No text present
|
No text found
|
|
3. Mobile_GetSeekBarValue
This keyword returns the current Seek Bar or Progress Bar value for the specified object. This keyword is used in the below mentioned situations where user wants to know the position of the seekbar for the Android Video or Audio player.
Seek Bar allows the user to change the value using touch event/draggable thumb/left-right arrow keys. The user can increase the value by dragging the thumb right or by pressing the right arrow key. Similarly, the user can decrease the value by dragging the thumb left or by pressing the left arrow key.
Example
If you want to get the Seek Bar value of an object, here is how you will use this keyword –
Use Mobile_LaunchAndroidApplication and Give the Device name and application Name Respectively in the Data Input Argument.
Use the keyword Mobile_GetSeekarValue to Find the seek bar value of the given object.
Map the object from OR to get the object height.
Test Object
Test Object Required? | Description |
Any Web Element | This Keyword takes one object input argument. You can choose web element whose value you want to get from your Object Repository. Tip: You can use OpKey Spy to add web element to Object Repository |
Input Data
Input Data Required? | Description |
No | This keyword does not require any Input data argument. . |
Output Data
Condition | Output value |
If the keyword passes successfully | Returns Integer Type |
if there is an error | Blank |
Error conditions
Conditions | Error Message | Debug Information |
Invalid Object
|
|
Blank object
| Argument Data Missing
| Data not provided for argument: ‘Object’.
|
4. Mobile_GetSeekBarMaxValue
This keyword returns the SeekBar or Progress Bar Maximum value for the specified object. This keyword is used in the situations where user wants to know the maximum value of clip length. max attribute in SeekBar defines the maximum it can take.
An example of SeekBar is your device’s brightness control and volume control.
If you want to get the SeekBarMax value of an object, here is how you will use this keyword –
Use Mobile_LaunchAndroidApplication and Give the Device name and application Name Respectively in the Data Input Argument.
Use the Keyword Mobile_GetSeekarMaxValue to Find the seek bar Max value of the given object.
Map the object from OR to get the object height.
Test Object
Test Object Required? | Description |
Any Web Element | This Keyword takes one object input argument. You can choose the web element whose value you want to get from your Object Repository. Tip: You can use OpKey Spy to add web element to Object Repository |
Input Data
Input Data Required? | Description |
No | This keyword does not require any Input data argument. . |
Output Data
Condition | Output value |
If the keyword passes successfully | Returns Integer Type |
if there is an error | Blank |
Error conditions
Conditions | Error Message | Debug Information |
Invalid Object
|
|
Blank object | Argument Data Missing | Data not provided for argument: ‘Object’. |
5. Mobile_GetSeekBarMinValue
This keyword returns the SeekBar or Progress Bar Minimum value for the specified object. This keyword is used in the situations where user wants to know the Minimum value of clip length.
An example of SeekBar is your device’s brightness control and volume control.
Example
If you want to get the SeekBar Min value of an object, here is how you will use this keyword –
Use Mobile_LaunchAndroidApplication and Give the Device name and application Name Respectively in the Data Input Argument.
Use the Keyword Mobile_GetSeekarMinValue to Find the seek bar Min value of the given object.
Map the object from OR to get the seek bar Min value.
Test Object
Test Object Required? | Description |
Any Web Element | This Keyword takes one object input argument. You can choose web element whose value you want to get from your Object Repository Tip: You can use OpKey Spy to add web element to Object Repository. |
Input Data
Input Data Required? | Description |
No | This keyword does not require any Input data argument. . |
Output Data
Condition | Output value |
If the keyword passes successfully | Returns Integer Type |
if there is an error | Blank |
Error conditions
Conditions | Error Message | Debug Information |
Invalid Object
|
|
Blank object | Argument Data Missing | Data not provided for argument: ‘Object’. |
6. Mobile_VerifySeekBarValue
This Keyword is used to verify the value of Seekbar for object taken in object Input Argument and Value given in data Input Argument is correct or incorrect with the actual value of Seekbar and accordingly true or False is displayed in output of Execution Result.
This keyword is used in the situations where user wants to verify seekbar value entered by user in TC for an object is same as that was extracted by using keyword Mobile_GetSeekbarVlaue.
In the example above, if you want to verify SeekBar value, here is how you will use this keyword –
Use Mobile_LaunchAndroidApplication and Give Device name and application Name Respectively in Data Input Argument.
Use Keyword Mobile_GetSeekbarValue to find the actual seekbar value of given object.
Map the object from OR to get the Actual value of SeekBar.
Use Keyword Mobile_VerifyseekbarValue to verify the actual value of given object with the Expected value entered in DataInputArgument.
Test Object
Test Object Required? | Description |
SeekBarElement | This Keyword takes one object input argument. You can choose edit box to be verified from your Object Repository Tip: You can use OpKey Spy to add edit box to Object Repository |
Input Data
Input Data Required? | Description |
ExpectedValue | Specify the value to be verified . |
Output Data
Condition | Output value |
If the keyword passes successfully | Returns Integer Type |
if there is an error | Blank |
11. Mobile_RunADBCommand
This keyword is used to run the adb command. It takes ADB command as Data Input Argument.The adb command facilitates a variety of device actions, such as installing and debugging apps.
To use adb with a device connected over USB, you must enable USB debugging in the device system settings, under Developer options.
Example
If you want to Run ADB command Mobile_RunADBCommand.
Use Mobile_LaunchAndroidApplication and Give Device name and application Name Respectively in Data Input Argument.
Use Mobile_RunADBCommand and Enter Command in Data Input Argument under Provide Data Field
To Press Home Button of connected device Enter ADB Command as Shell input Keyevent3.
Test Object
Test Object Required | Description |
No | This Keyword does not take any object data argument |
Input Data
Input Data Required | Description |
ADB Commands | Enter ADB command . |
Output Data
Condition | Output value |
If correct ADB command is entered | Event Performed |
Error conditions
Conditions | Message | Debug Info |
Invalid command | Verification Failed | Fail |
Blank Text | Argument Data Invalid |
12. Mobile_Done
This keyword clicks on Done key on mobile device keyboard. This keyword is mostly used in situations where you want to access the mobile device keyboard Done key for moving from one field to another.
Example
If user wants to click on Done key on the Mobile Device Keyboard without recording it, use Mobile_Done keyword.
Test Object
Test Object Required? | Description |
No | This Keyword does not take any object data argument |
Input Data
Input Data Required? | Description |
No | This keyword does not take any input data argument . |
Output Data
Condition | Output value |
If keyword passes successfully | Event Performed |
If keyword fails | False |
13. Mobile_Enter
This keyword clicks on Enter key on mobile device keyboard. This keyword is mostly used in situations where you want to access the mobile device keyboard’s Enter key for moving from one line to another.
Example
If user wants to click on Enter key on the Mobile Device Keyboard without recording it, use Mobile_Enter keyword.
Test Object
Test Object Required? | Description |
No | This Keyword does not take any object data argument |
Input Data
Input Data Required? | Description |
No | This keyword does not take any input data argument . |
Output Data
Condition | Output value |
If keyword passes successfully | True |
If keyword fails | False |
14. Mobile_Go
This keyword clicks on Go Key on mobile device keyboard. This keyword is mostly used in situations where you want to redirect to the next page or you want to move from one field to another.
It depends upon the functionality of the application.
Example
If user wants to click on Go key on the Mobile Device Keyboard without recording it, use Mobile_Go keyword.
Test Object
Test Object Required? | Description |
No | This Keyword does not take any object data argument |
Input Data
Input Data Required? | Description |
No | This keyword does not take any input data argument . |
Output Data
Condition | Output value |
If keyword passes successfully | True |
If keyword fails | False |
15. Mobile_Next
This keyword clicks on Next Key on mobile device keyboard. This keyword is mostly used in situations where you want to move from one field to another.
It depends upon the functionality of the application.
Example
If user wants to click on Next key on the Mobile Device Keyboard without recording it, use Mobile_Next keyword.
Test Object
Test Object Required? | Description |
No | This Keyword does not take any object data argument |
Input Data
Input Data Required? | Description |
No | This keyword does not take any input data argument . |
Output Data
Condition | Output value |
If keyword passes successfully | True |
If keyword fails | False |
16. Mobile_ClickByText
This keyword is used to click on the matching text. It takes Text to be clicked, index number(index no starts from 0) and Contains Text (By Default false) as Data Input Argument.
Test Object
Test Object Required? | Description |
No | This Keyword does not take any object data argument |
Input Data
Input Data Required? | Description |
Text | * It is of String type. * It takes Text to be clicked. . |
Index | * It is of Integer type. * It takes the index no. of the Text to be clicked and if no index no is given, it will take 0 index no. * Index number specifies the index at which the text is present. * It starts from 0 if the Text present on screen is not repeatable.
|
Contains Text | * It is of Boolean type. * By default it is false. * If you want to click on a text by giving partial text in the Text Argument, then you have to change Contains Text argument to True. * If you want to click on a Text by giving exactly the same text in the Text Argument, then you have to keep Contains Text argument as False.
|
Output Data
Condition | Output value |
If keyword passes successfully | True |
If keyword fails | False |
Error Conditions
Conditions | Message | Debug Info |
Blank Text | Argument Data Missing | —- |
Invalid Text | Text Not Found | Fail |
Wrong Index is given | Text Not Found | Fail |
Device and Application not selected | | |
17. Mobile_CloseAndUninstall
This keyword is used for Closing and then Uninstalling the mobile application from the mobile device.
Test Object
Test Object Required? | Description |
No | This Keyword does not take any object data argument |
Input Data
Input Data Required? | Description |
No | This keyword does not take any input data argument . |
Output Data
Condition | Output value |
If keyword passes successfully | True |
If keyword fails | False |
Error Conditions
Condition | |
If device and application is not selected.
|
|
18. Mobile_LaunchAndroidApplication
This keyword is used to Install and Launch any android mobile application. If the android application is already installed on the mobile device, it will uninstall the android application and then install and launch the application.
Input Arguments
Object Input Arguments | Required? |
Object | no |
Data Input Arguments | Required? | Description |
Device | Yes | It takes the Android Mobile Device on which a particular script should be run. |
Application | Yes | It takes the Android Application which is to be installed and launched on Android Mobile Device. |
Output
True | If the keyword passes successfully |
False | If there is an error |
Error Conditions
Conditions | Message | Debug Info |
Device and Application is not selected | Argument Data Missing | Data not provided for argument: ‘Device’ & ‘Application’ |
Device Selected, Application not Selected. | Argument Data Missing | Data not provided for argument: ‘Application’ |
Device not Selected, Application Selected. | Argument Data Missing | Data not provided for argument: ‘Device’ |
Wrong Device Selected, Application Selected | | |
18. Mobile_LaunchApplication
This keyword is used to Launch the already installed mobile application that the user wants to Launch. If the mobile application is already installed on the mobile device, it will directly launch the application without uninstalling it.
If the mobile application is not present on the Mobile Device, it will install the application and then launch the mobile application.
Test Object
Test Object Required? | Description |
No | This Keyword does not take any object data argument |
Input Data
Input Data Required? | Description |
Device | It takes Mobile Device on which a particular script should be run. . |
Application | It takes Application which is to be launched on Mobile Device. |
Output Data
Condition | Output value |
If keyword passes successfully | True |
If keyword fails | False |
Error Conditions
Conditions | Message | Debug Info |
Device and Application is not selected | Argument Data Missing | Data not provided for argument: ‘Device’ & ‘Application’ |
Device Selected, Application not Selected. | Argument Data Missing | Data not provided for argument: ‘Application’ |
Device not Selected, Application Selected. | Argument Data Missing | Data not provided for argument: ‘Device’ |
Wrong Device Selected, Application Selected | | |
19. Mobile_CloseApplication
This keyword is used for Closing and then Uninstalling the mobile application from the mobile device. It doesn’t take any object/data input argument.
Test Object
Test Object Required? | Description |
No | This Keyword does not take any object data argument |
Input Data
Input Data Required? | Description |
No | This Keyword does not take any input data argument . |
Output Data
Condition | Output value |
If keyword passes successfully | True |
If keyword fails | False |
Error Conditions
Conditions | Message | Debug Info |
If device and application is not selected. | | |
20. Mobile_LongPress
This keyword is used to LongPress on the objects that are Long-Clickable. It takes object to be long-clicked as Object Input Argument and duration (in Seconds) as Data Input Argument.
By default it will long-click/press the object for 3 seconds.
Example
If you want to LongPress this object, use Mobile_LongPress keyword.
* Provide the Valid Object which is Long-Clickable as Object Input Argument.
Provide the Duration in seconds (by default it will long-press the valid object for 3 seconds) for the valid object which is Long-Clickable as Data Input Argument.
Test Object
Test Object Required? | Description |
Yes | It takes the object that is long-clickable. |
Input Data
Input Data Required? | Description |
Duration | * It is of Integer type. * It takes the time in seconds. * If the Duration argument is kept empty, By default it will long-click/press the object for 3 seconds. |
Output Data
Condition | Output value |
If keyword passes successfully | True |
If keyword fails | False |
Error Conditions
Conditions | Message | Debug Info |
Object and duration not provided. | Argument Data Missing | Data not provided for argument: ‘Object’ |
Object not given, Duration given | Argument Data Missing | Data not provided for argument: ‘Object’ |
Invalid Object, Valid Duration | Object Not Found | —- |
Application and Device not selected |
21. Mobile_SwitchBluetooth
This keyword is used to Switch ON or OFF the Mobile device Bluetooth. It takes status (ON or OFF | on or off) as Data Input Argument.
Example
CASE I: If you want to switch on Mobile Device Bluetooth, use Mobile_SwitchBluetooth keyword with Status = ON|on.
CASE II: If you want to switch off Mobile Device’s Bluetooth, use Mobile_SwitchBluetooth keyword with Status = OFF|off
Test Object
Test Object Required? | Description |
Yes | It takes the object that is long-clickable. |
Input Data
Input Data Required? | Description |
Status | * It is of String type. * It takes ON|OFF|on|off as Status argument to Switch ON/ OFF Mobile Device Wifi. |
Output Data
Condition | Output value |
If keyword passes successfully | True |
If keyword fails | False |
Error Conditions
Conditions | Message | Debug Info |
Status not given | Argument Data Missing | —- |
Invalid Status | Argument Data Invalid | —- |
If bluetooth is already ON and user ON it again | Bluetooth is already ON | —- |
If bluetooth is already OFF and user OFF it again | Bluetooth is already OFF | —- |
Device and Application not selected. |
Example
CASE I: If you want to switch on Mobile Device Bluetooth, use Mobile_SwitchBluetooth keyword with Status = ON|on.
CASE II: If you want to switch off Mobile Device’s Bluetooth, use Mobile_SwitchBluetooth keyword with Status = OFF|off
22. Mobile_SwitchWifi
This keyword is used to Switch ON or OFF the Mobile device Wifi. It takes status (ON or OFF | on or off) as Data Input Argument.
Example
CASE I: If you want to switch on Mobile Device Wifi, use Mobile_SwitchWifi keyword with Status = ON|on.
CASE II: If you want to switch OFF Mobile Device Wifi, use Mobile_SwitchWifi keyword with Status = OFF|of
Test Object
Test Object Required? | Description |
Yes | It takes the object that is long-clickable. |
Input Data
Input Data Required? | Description |
Status | * It is of String type. * It takes ON|OFF|on|off as Status argument to Switch ON/ OFF Mobile Device Wifi. |
Output Data
Condition | Output value |
If keyword passes successfully | True |
If keyword fails | False |
Error Conditions
Conditions | Message | Debug Info |
Status not given | Argument Data Missing | —- |
Invalid Status | Argument Data Invalid | —- |
If Wifi is already ON and user ON it again | Wifi is already ON | —- |
If Wifi is already OFF and user OFF it again | Wifi is already OFF | —- |
Device and Application not selected. | | |
23. Mobile_SwitchAirplaneMode
This keyword is used to Switch ON or OFF the Mobile device Airplane Mode. It takes Value (ON|OFF or on|off) as Data Input Argument.
Example
CASE I: If you want to switch on Mobile Device Airplane Mode, use Mobile_SwitchAirplaneMode keyword with Status = ON|on|On.
CASE II: If you want to switch off Mobile Device Airplane Mode, use Mobile_SwitchAirplaneMode keyword with Status = OFF|off|Of.
Test Object
Test Object Required? | Description |
Yes | It takes the object that is long-clickable. |
Input Data
Input Data Required? | Description |
Status | * It is of String type. * It takes ON|OFF|on|off as Status argument to Switch ON/ OFF Mobile Device Wifi. |
Output Data
Condition | Output value |
If keyword passes successfully | True |
If keyword fails | False |
Error Conditions
Conditions | Message | Debug Info |
Value not given | Argument Data Missing | —- |
Invalid Value | Argument Data Invalid | —- |
If AirplaneMode is already ON and user ON it again | Airplane Mode is already ON | —- |
If AirplaneMode is already OFF and user OFF it again | Airplane Mode is already OFF | —- |
Device and Application not selected. | | |
24. Mobile_SwitchMobileData
This keyword is used to Switch ON or OFF the Mobile device mobile data. It takes Value (ON|OFF or on|off) as Data Input Argument.
Example
CASE I: If you want to switch on Mobile Device Mobile Data, use Mobile_SwitchMobileData keyword with Status = ON|on|On.
CASE II: If you want to switch off Mobile Device Mobile Data, use Mobile_SwitchMobileData keyword with Status = OFF|off|Of.
Test Object
Test Object Required? | Description |
Yes | It takes the object that is long-clickable. |
Input Data
Input Data Required? | Description |
Status | * It is of String type. * It takes ON|OFF|on|off as Status argument to Switch ON/ OFF Mobile Device Wifi. |
Output Data
Condition | Output value |
If keyword passes successfully | True |
If keyword fails | False |
Error Conditions
Conditions | Message | Debug Info |
Value not given | Argument Data Missing | —- |
Invalid Value | Argument Data Invalid | —- |
If Mobile Data is already ON and user ON it again | Mobile Data is already ON | —- |
If Mobile Data is already OFF and user OFF it again | Mobile Data is already OFF | —- |
Device and Application not selected. | | |
25. Mobile_SwipeTowards
This keyword is used to Swipe in different directions on the mobile screen. It takes direction ( left|right|up|down or LEFT|RIGHT|UP|DOWN or Left|Right|Up|Down ) as Data Input Argument.
Example
CASE I: If you want to Swipe upwards on Mobile Device, use Mobile_SwipeTowards keyword with Direction = UP|up|Up.
CASE II: If you want to Swipe downwards on Mobile Device, use Mobile_SwipeTowards keyword with Direction = DOWN|down|Down.
CASE III: If you want to Swipe left on Mobile Device, use Mobile_SwipeTowards keyword with Direction = LEFT|left|Left.
Test Object
Test Object Required? | Description |
Yes | It takes the object that is long-clickable. |
Input Data
Input Data Required? | Description |
Direction | * It is of String type. * It takes Direction argument which is used to perform swipe actions on the Mobile Device. * Direction can be up|UP or down|DOWN or left|LEFT or right|Right. |
Output Data
Condition | Output value |
If keyword passes successfully | True |
If keyword fails | False |
Error Conditions
Conditions | Message | Debug Info |
Direction not given | Argument Data Missing | —- |
Invalid Direction | Argument Data Invalid | —- |
Device and Application not selected. | | |
26. Mobile_SwipeOnObject
This keyword is used to Swipe on particular object of an Application. It takes object as Object Input Argument and Direction ( left|right|up|down or LEFT|RIGHT|UP|DOWN) as Data Input Argument.
Example
If you want to Swipe on the above highlighted object, use Mobile_SwipeOnObject Keyword by giving the object to be swiped and direction.
Test Object
Test Object Required? | Description |
Yes | It takes the object that is long-clickable. |
Input Data
Input Data Required? | Description |
Direction | * It is of String type. * It takes Direction argument which is used to perform swipe actions on the Mobile Device. * Direction can be up|UP or down|DOWN or left|LEFT or right|Right. |
Output Data
Condition | Output value |
If keyword passes successfully | True |
If keyword fails | False |
Error Conditions
Conditions | Message | Debug Info |
Object not given, Direction not given | Argument Data Missing | Data not provided for argument: ‘Object’ & ‘Direction’ |
Object not given, Direction given | Argument Data Missing | Data not provided for argument: ‘Object’ |
Object given, Direction not given | Argument Data Missing | Data not provided for argument: ‘Direction’ |
Invalid Object given, Direction given | Object Not Found | —- |
Invalid Object given, Direction not given | Object Not Found | —- |
Device and Application not selected. | | |
27. Mobile_SwipeToText
This keyword is used to Swipe to a particular Text. It takes Text to be swiped, index number (index number starts from 0) and Contains Text (By Default false) as Data Input Argument.
This keyword is used in situations where the text is not visible on the screen.
It swipes only in upwards or downwards direction.
Example
CASE I: If the above highlighted text “Smartlight” is not visible on the screen and user wants to Swipe to the text Smartlight, then use Mobile_SwipeToText keyword.
In this case, user will be able to swipe to the text “Smartlight”
CASE II: If the above highlighted text “Lucid dreaming” is not visible on the screen and user wants to Swipe to the text “Lucid dreaming” by only entering partial characters, then use Mobile_SwipeToText keyword.
In this case, user will be able to swipe to the text “Lucid dreaming”
Test Object
Test Object Required? | Description |
Yes | It takes the object that is long-clickable. |
Input Data
Input Data Required? | Description |
Text | * It is of String type. *It takes Text upto which swipe action (Up/down) needs to be performed. |
Index | * It is of Integer type. * It takes the index no. of the Text to be swiped and if no index no is given, it will take 0 index no. * Index number specifies the index at which the text is present. * It starts from 0 if the Text present on screen is not repeatable.
|
Contains Text | * It is of Boolean type. * By default it is false. * If you want to Swipe to text by giving partial text in the Text Argument, then you have to change Contains Text argument to True. * If you want to Swipe to text by giving exactly the same text in the Text Argument, then you have to keep Contains Text argument as False.
|
Output Data
Condition | Output value |
If keyword passes successfully | True |
If keyword fails | False |
Error Conditions
Conditions | Message | Debug Info |
Blank Text | Argument Data Missing | —- |
Invalid Text | Text Not Found | Fail |
Wrong Index is given | Text Not Found | Fail |
Device and Application not selected | | |
28. Mobile_SwipeToObject
This keyword is used to Swipe to a particular Object. It takes the object to be swiped as Object Input Argument. This keyword is used in situations where the object is not visible on the screen.
It swipes only in upwards or downwards direction.
Example
CASE I: If the above highlighted object “Smartlight” is not visible on the screen and user wants to Swipe to the object Smartlight, then use Mobile_SwipeToObject keyword.
In this case, user will be able to Swipe to the Object “Smartlight”
Test Object
Test Object Required? | Description |
Object | * It takes the object upto which swipe actions (up/down) needs to be performed. |
Input Data
Input Data Required? | Description |
No | This keyword does not require any input data argument |
Output Data
Condition | Output value |
If keyword passes successfully | True |
If keyword fails | False |
Error Conditions
Conditions | Message | Debug Info |
Object not given | Argument Data Missing | Data not provided for argument: ‘Object’ |
Wrong Object is given | Object Not Found | —- |
Device and Application not selected. | | |
29. Mobile_SelectByText
This keyword is used to select/click the matching text. It takes Text to be select/clicked as Data Input Argument.
Example
CASE I: If you want to click/select LOG IN button, then use Mobile_SelectByText keyword. In this case, LOG IN button will be selected/clicked.
Error Conditions
Conditions | Message | Debug Info |
Blank Text | Argument Data Missing | —- |
Invalid Text | Text Not Found | Fail |
Device and Application not selected | | |
30. Mobile_RelaunchCurrentApplication
This keyword is used to relaunch the current application which is open in the background or present on the device which is minimised for some reason. This keyword relaunches that application which was given in the Mobile_LaunchAndroidApplication or Mobile_LaunchApplication keyword.
Note: Make sure that you will use Mobile_LaunchAndroidApplication or Mobile_LaunchApplication keyword before Mobile_RelaunchCurrentApplication keyword.
Example
If you want to restore/relaunch above highlighted “Sleep Application”, then:
* Make sure that you will use Mobile_LaunchAndroidApplication or Mobile_LaunchApplication keyword before Mobile_RelaunchCurrentApplication keyword.
* Add Mobile_RelaunchCurrentApplication keyword.
* The above “Sleep Application” which is minimised for some reason will be Relaunched.
Test Object
Test Object Required? | Description |
No | This keyword does not require any object data argument |
Input Data
Input Data Required? | Description |
No | This keyword does not require any input data argument |
Output Data
Condition | Output value |
If keyword passes successfully | True |
If keyword fails | False |
Error Conditions
Conditions | Message | Debug Info |
Device and application not selected. | | |
31. Mobile_MediaNext
This keyword is used to click on next button in Android Media Player. This keyword is used in situations where user wants to change or move to the next audio or video in the Android Media Player.
Example
If you want to go to the next audio or video in the Android Media Player without recording it, use Mobile_MediaNext Keyword.
Test Object
Test Object Required? | Description |
No | This keyword does not require any object data argument |
Input Data
Input Data Required? | Description |
No | This keyword does not require any input data argument |
Output Data
Condition | Output value |
If keyword passes successfully | True |
If keyword fails | False |
Error Conditions
Conditions | Message | Debug Info |
Device and application not selected. | | |
32. Mobile_MediaPrevious
This keyword is used to click on Previous button in Android Media Player. This keyword is used in situations where user wants to change or move to the previous audio or video in the Android Media Player.
Example
If you want to go back to the Previous audio or video in the Android Media Player without recording it, use Mobile_MediaPrevious Keyword.
Test Object
Test Object Required? | Description |
No | This keyword does not require any object data argument |
Input Data
Input Data Required? | Description |
No | This keyword does not require any input data argument |
Output Data
Condition | Output value |
If keyword passes successfully | True |
If keyword fails | False |
Error Conditions
Conditions | Message | Debug Info |
Device and application not selected. | | |
33. Mobile_MediaPause
This keyword is used to click on Pause button in Android Media Player. This keyword is used in situations where user wants to Pause any audio or video in the Android Media Player.
Example
If you want to Pause any audio or video in the Android Media Player without recording it, use Mobile_MediaPause Keyword.
Test Object
Test Object Required? | Description |
No | This keyword does not require any object data argument |
Input Data
Input Data Required? | Description |
No | This keyword does not require any input data argument |
Output Data
Condition | Output value |
If keyword passes successfully | True |
If keyword fails | False |
Error Conditions
Conditions | Message | Debug Info |
Device and application not selected. | | |
34. Mobile_MediaPlay
This keyword is used to click on Play button in Android Media Player. This keyword is used in situations where user wants to Play any audio or video in the Android Media Player.
Example
If you want to Play any audio or video in the Android Media Player without recording it, use Mobile_MediaPlay Keyword.
Test Object
Test Object Required? | Description |
No | This keyword does not require any object data argument |
Input Data
Input Data Required? | Description |
No | This keyword does not require any input data argument |
Output Data
Condition | Output value |
If keyword passes successfully | True |
If keyword fails | False |
Error Conditions
Conditions | Message | Debug Info |
Device and application not selected. | | |
35. Mobile_VolumeDown
This keyword is used to decrease the media volume in any Android Mobile Device. It doesn’t take any object/data input argument.
Example
If you want to decrease the above-highlighted media volume in any Android Mobile Device without recording it, use Mobile_VoulumeDown Keyword.
Test Object
Test Object Required? | Description |
No | This keyword does not require any object data argument |
Input Data
Input Data Required? | Description |
No | This keyword does not require any input data argument |
Output Data
Condition | Output value |
If keyword passes successfully | True |
If keyword fails | False |
Error Conditions
Conditions | Message | Debug Info |
Device and application not selected. | | |
36. Mobile_VolumeUp
This keyword is used to increase the media volume in any Android Mobile Device. It doesn’t take any object/data input argument.
Example
If you want to increase the above highlighted media volume in any Android Mobile Device without recording it, use Mobile_VoulumeUp Keyword.
Test Object
Test Object Required? | Description |
No | This keyword does not require any object data argument |
Input Data
Input Data Required? | Description |
No | This keyword does not require any input data argument |
Output Data
Condition | Output value |
If keyword passes successfully | True |
If keyword fails | False |
Error Conditions
Conditions | Message | Debug Info |
Device and application not selected. | | |
37. Mobile_VolumeMute
This keyword is used to mute the media volume in any Android Mobile Device. This keyword is used to increase the media volume in any Android Mobile Device. It doesn’t take any object/data input argument.
Example
If you want to mute the above-highlighted media volume in any Android Mobile Device without recording it, use Mobile_VoulumeMute Keyword.
Test Object
Test Object Required? | Description |
No | This keyword does not require any object data argument |
Input Data
Input Data Required? | Description |
No | This keyword does not require any input data argument |
Output Data
Condition | Output value |
If keyword passes successfully | True |
If keyword fails | False |
Error Conditions
Conditions | Message | Debug Info |
Device and application not selected. | | |
38. Mobile_MediaForward
This keyword is used to click on forward button in Android Media Player. This keyword is used in situations where user wants to forward any audio or video in the Android Media Player.
Test Object
Test Object Required? | Description |
No | This keyword does not require any object data argument |
Input Data
Input Data Required? | Description |
No | This keyword does not require any input data argument |
Output Data
Condition | Output value |
If keyword passes successfully | True |
If keyword fails | False |
Error Conditions
Conditions | Message | Debug Info |
Device and application not selected. | | |
39. LoadOpkeyMobility
This keyword is used to load the OpKey Mobility plugin at runtime during the Test Execution. This keyword is generally used when you have a Test Case which has all Generic keywords along with few Mobility keywords which are OpKey Mobility specific. This keyword is doesn’t take any object or data input argument.
Scenario:
Suppose there is a Test Case which has both web & mobile test steps. In such case, you need to load both plugins (web & OpKey Mobility plugins) at runtime so that they can be used for executing respective test steps, as required.
You need to add this keyword (LoadOpKeyMobility) with a test step, save the test case and then click on Run Now. It will take few moments to load the required plugins (as per the added test steps). There will be a popup message regarding the loaded plugins which will be used for executing the test case.
Test Object
Test Object Required? | Description |
No | This keyword does not require any object data argument |
Input Data
Input Data Required? | Description |
No | This keyword does not require any input data argument |
Output Data
Condition | Output value |
If keyword passes successfully | True |
If keyword fails | False |
Error Conditions
Conditions | Message | Debug Info |
When keyword “LoadOpKeyMobility” is not added to the Test Step. | Plugin Not Loaded (-9902100) DESCRIPTION: A plugin was not loaded at the execution site. This might happen if the plugin was used in authoring a test but was not installed on the machine where the actual execution took place. Even an installed plugin might fail if its dependencies are not properly installed. | Oops! Seems like ‘OpKeyMobility’ is not added in your package or not installed with the agent. Kindly contact OpKey Support Team at support@opkey.com |
40. LoadAppium
This keyword is used to load the Appium plugin at runtime during the Test Execution. This keyword is generally used when you have a Test Case which has all Generic keywords along with few Appium keywords which are Appium specific. This keyword is doesn’t take any object or data input argument.
Scenario:
Suppose there is a Test Case which has both web & mobile test steps. In such case, you need to load both plugins (web & Appium plugins) at runtime so that they can be used for executing respective test steps, as required.
You need to add this keyword (LoadAppium) with a test step, save the test case and then click on Run Now. It will take few moments to load the required plugins (as per the added test steps). There will be a popup message regarding the loaded plugins which will be used for executing the test case.
Test Object
Test Object Required? | Description |
No | This keyword does not require any object data argument |
Input Data
Input Data Required? | Description |
No | This keyword does not require any input data argument |
Output Data
Condition | Output value |
If keyword passes successfully | True |
If keyword is failed | False |
Error Conditions
Conditions | Message | Debug Info |
When keyword “LoadAppium” is not added to the Test Step. | Oops! Seems like ‘OpKeyMobility’ is not added in your package or not installed with the agent. Kindly contact OpKey Support Team at support@opkey.com for assistance. | Oops! Seems like ‘Appium’ is not added in your package or not installed with the agent. Kindly contact OpKey Support Team at support@opkey.com for assistance. |
Mobile_SwitchGPS
This keyword is used to switch the status of the locally connected mobile device. It ensures the GPS status of the connected mobile device as per the given status ON or OFF.
Scenario:
Suppose the current status of the connected mobile device is ON and you have provided OFF then it will GPS status OFF. If the current status of the connected mobile device is ON and you have provided ON as data input argument then it will check current status and verify Yes as current GPS status is ON.
If the current status of the connected mobile device is OFF and you have provided ON then it will GPS status ON. If the current status of the connected mobile device is OFF and you have provided FF as data input argument then it will check current status and verify Yes as current GPS status is OFF.
Test Object
Test Object Required? | Description |
No | This keyword does not require any object data argument |
Input Data
Input Data Required? | Description |
Yes | Yes (ON/OFF) |
Output Data
Condition | Output value |
If keyword passes successfully | True |
If keyword is failed | False |
Error Condition
Conditions | Message | Debug Info |
When data input argument is Not Given (i.e. Blank) | Argument Data Missing (-13200) | One or more of the arguments have not been provided a value. |
Click Here to learn more about Opkey features.
To learn more about using these keywords in a test case, you can visit https://university.opkeylms.com and enroll in our Opkey series course.
Doc navi