Skip to content

Mobile Syntax

6.2.1. Active App

Active app with application ID. 

  • Target: No Target is required.
  • Data Input: appID: Input the Id of application want to active.
  • Syntax: active app ("");

6.2.2. Check Device Is Locker

Check the device if it is locked. 

  • Target: No Target is required.
  • Data Input: No Data input is required.
  • Data Output: Create output for this step in Variable Tab of the test case. Then the result will return as shown in the report below.
  • Syntax: check device is locked => output;

6.2.3. Check Keyboard Is Showing

Check keyboard if it is showing. 

  • Target: No Target is required.
  • Data Input: No Data input is required.
  • Data Output: Create output for this step in Variable Tab of the test case. Then the result will return as shown in the report below.
  • Syntax: check keyboard is showing => output;

6.2.4. Clear Text

Clear text of a mobile element within a time in second unit. 

  • Target: Select UIObject that you defined in Object Repositories.
  • Data Input: Timeout is waiting time for returning result(s)
  • Syntax: clear text [target] ("0");

6.2.5. Clear Text

Click on the given element.  

  • Target: Select UIObject that you defined in Object Repositories.
  • Data Input: Timeout is waiting time for returning result(s)
  • Syntax: click [target] ("0");

6.2.6. Double Tap

Perform a double-tap action on a mobile element.  

  • Target: Select UIObject that you defined in Object Repositories.
  • Data Input: No Data Input is required.
  • Syntax: double tap [target] ("0");

6.2.7. Double Tap With Coordinates

Double tap an element with coordinates. 

  • Target: No Target is required.
  • Data Input:
    • x: point coordinates to tap on the screen on the horizontal axis.
    • y: point coordinates to tap on the screen along the vertical axis. 
  • Syntax: double tap with coordinates ("0", "0");

6.2.8. Drag And Drop To Element

Drag an object and drop it onto another object.  

  • Target:
    • from: UIObject of starting. 
    • to: destination Object. 
  • Data Input: Waiting time for returning result(s)
  • Syntax: drag and drop to element [from, to] ("0");

6.2.9. Drag And Drop To Position

Drag an object and drop it to position.  

  • Target: No Target is required.
  • Data Input:
    • x: Point coordinates to tap on the screen on the horizontal axis.
    • y: Point coordinates to tap on the screen along the vertical axis.
    • timeout: Timeout is waiting time for returning result(s).
  • Syntax: drag and drop to position [target] ("0", "0", "0");

6.2.10. Get App State

Get the app’s state with application’s ID.  

  • Target: No Target is required.
  • Data Input: Input the application’s ID in cell “Input”.
  • Data Output: The app’s state.
  • Syntax: get app state ("") => output;

6.2.11. Get Attribute Value

Get a specific attribute value of a mobile element.  

  • Target: Select UIObject that you defined in Object Repositories.
  • Data Input:
    • attributeName: such as id, name, class, text… 
    • timeout: System will wait at most timeout (seconds) to return resultPoint coordinates to tap on the screen along the vertical axis. 
  • Data Output: Attribute value of a mobile element.
  • Syntax: get attribute value [target] ("", "0") => output;

6.2.12. Get Device Time

Get time in device follow the output’s format.  

  • Target: No Target is required.
  • Data Input: The format time you want.
  • Data Output: Time in device.
  • Syntax: get device time ("") => output;

6.2.13. Get Location

Get time in device follow the output’s format.  

  • Target: No Target is required.
  • Data Input: No Data input is required.
  • Data Output: Device’s location.
  • Syntax: get location => output;

6.2.14. Get Screen Height

Get the device’s physical height.  

  • Target: No Target is required.
  • Data Input: No Data input is required.
  • Data Output: The device screen’s physical height.
  • Syntax: get screen height => output;

6.2.15. Get Screen Orientation

Get the current screen orientation of the device.  

  • Target: No Target is required.
  • Data Input: No Data input is required.
  • Data Output: The current screen orientation of the device.
  • Syntax: get screen orientation => output;

6.2.16. Get Screen Width

Get the device’s physical width.  

  • Target: No Target is required.
  • Data Input: No Data input is required.
  • Data Output: The device screen’s physical width.
  • Syntax: get screen width => output;

6.2.17. Get Text

Get the visible (i.e. not hidden by CSS) inner text of the element, including sub-elements, without any leading or trailing white space.  

  • Target: Select UIObject that you defined in Object Repositories.
  • Data Input: Input timeout then System will wait at most timeout (seconds) to return result.
  • Data Output: The inner text of the element.
  • Syntax: get text [target] ("0") => output;

6.2.18. Hide Keyboard

Hide the keyboard in device.  

  • Target: No Target is required.
  • Data Input: No Data input is required.
  • Syntax: hide keyboard;

6.2.19. Look Device

Lock the device.  

  • Target: No Target is required.
  • Data Input: No Data input is required.
  • Syntax: lock device;

6.2.20. Look Device

Perform a long press action on a mobile element.   

  • Target: Select UIObject that you defined in Object Repositories.
  • Data Input:
    • pressDuration: Set the time in second to perform long press in element.
    • timeout: Input timeout then System will wait at most timeout (seconds) to return result.
  • Syntax: long press [target] ("0", "0");

6.2.21. Long Press Android Keycode

Long Press using Mobile key code (it’s the same as using keyboard when testing Web app).   

  • Target: No Target is required.
  • Data Input: keycode: These belong to Mobile actions, not application.
  • Syntax: long press android keycode ("");

6.2.22. Long Press With Coordinates

Long press in viewport with coordinates.   

  • Target: No Target is required.
  • Data Input:
    • x: Point coordinates to tap on the screen on the horizontal axis.
    • y: Point coordinates to tap on the screen along the vertical axis.
    • pressDuration: Duration for press within seconds time unit. 
  • Syntax: long press with coordinates ("0", "0", "0");

6.2.23. Press Android Keycode

Long Press using Mobile key code (it’s the same as using keyboard when testing Web app).   

  • Target: No Target is required.
  • Data Input: keycode: These belong to Mobile actions, not application.
  • Syntax: press android keycode ("");

6.2.24. Scroll By Coordinate

Scroll in view port using coordinate.   

  • Target: No Target is required.
  • Data Input:
    • xStart: Starting point coordinates on the horizontal axis to swipe on the screen. 
    • yStart: Starting point coordinates on the vertical axis to swipe on the screen. 
    • xEnd: Ending point coordinates on the horizontal axis to swipe on the screen. 
    • yEnd: Ending point coordinates on the vertical axis to swipe on the screen. 
  • Syntax: scroll by coordinate ("0", "0", "0", "0");

6.2.25. Scroll Down Till Element In View Port

Scroll down in view port till element display in view port.   

  • Target: Select UIObject that you defined in Object Repositories.
  • Data Input:
    • maximumNumberOfScroll: The maximum number of scroll down in view port. 
    • findElementTimeout: Timeout for find element.  
  • Syntax: scroll down till element in view port [target] ("0", "0") => output;

6.2.26. Send Keys

Send text to a mobile element.   

  • Target: Select UIObject that you defined in Object Repositories.
  • Data Input:
    • text: the text you want to send.
    • timeout: System will wait at most timeout (second) to return result.  
  • Syntax: send keys [target] ("", "0");

6.2.27. Set Location

Set location for device.   

  • Target: No Target is required.
  • Data Input:
    • latitude: The Latitude of location 
    • longitude: The Longitude of location 
    • altitude: The altitude of location  
  • Syntax: set location ("0.0", "0.0", "0.0");

6.2.28. Shake

Simulate shake the device.   

  • Target: No Target is required.
  • Data Input: No Data input is required.
  • Syntax: shake;

6.2.29. Start Mobile Automation

Start up a mobile application. 

  • Target: No Target is required.
  • Data Input: No Data input is required.
  • Syntax: start mobile automation;

6.2.30. Stop Mobile Automation

Close the currently running application. 

  • Target: No Target is required.
  • Data Input: No Data input is required.
  • Syntax: stop mobile automation;

6.2.31. Swipe By Coordinate

Simulate swiping fingers on the mobile device with coordinate. 

  • Target: No Target is required.
  • Data Input:
    • xStart: Starting point coordinates on the horizontal axis to swipe on the screen.
    • yStart: Starting point coordinates on the vertical axis to swipe on the screen.
    • xEnd: Ending point coordinates on the horizontal axis to swipe on the screen. 
    • yEnd: Ending point coordinates on the vertical axis to swipe on the screen. 
  • Syntax: swipe by coordinate ("0", "0", "0", "0");

6.2.32. Switch to Landscape

Change the device’s screen view to Landscape mode.

  • Target: No Target is required.
  • Data Input: No Data input is required. 
  • Syntax: switch to landscape;

6.2.33. Switch to Portrait

Change the device’s screen view to Portrait mode.

  • Target: No Target is required.
  • Data Input: No Data input is required. 
  • Syntax: switch to portrait;

6.2.34. Tap

Tap an element in screen within timeout is seconds unit.

  • Target: No Target is required.
  • Data Input: Waiting time for returning result(s) 
  • Syntax: tap [target] ("0");

6.2.35. Tap With Coordinates

Tap an element in screen with coordinate.

  • Target: No Target is required.
  • Data Input:
    • x: point coordinates to tap on the screen on the horizontal axis. 
    • y: point coordinates to tap on the screen along the vertical axis. 
  • Syntax: tap with coordinates ("0", "0");

6.2.36. Terminate App

Terminate application (turn off totally app) with given application ID.

  • Target: No Target is required.
  • Data Input: appId: Id of application.
  • Syntax: terminate app ("") => output;

6.2.37. Toggle Data

Simulate user switch toogle for using mobile data (3G,4G…)

  • Target: No Target is required.
  • Data Input: No Data input is required.
  • Syntax: toggle data;

6.2.38. Toggle Location Service

Simulate user toggle location service icon.

  • Target: No Target is required.
  • Data Input: No Data input is required.
  • Syntax: toggle location service;

6.2.39. Toggle Wifi

Simulate user toggle wifi icon.

  • Target: No Target is required.
  • Data Input: No Data input is required.
  • Syntax: toggle wifi;

6.2.40. Unlock Device

Simulate user unlock the device.

  • Target: No Target is required.
  • Data Input: No Data input is required.
  • Syntax: unlock device;

6.2.41. Verify Element Attribute Value

Verify if the mobile element has an attribute with the specified name and value.

  • Target: Select UIObject that you defined in Object Repositories.
  • Data Input:
    • attributeName: such as id, name, class, text… 
    • expectedValue: value of given attribute above. 
    • timeouts: is waiting time for returning result(s). 
  • Syntax: verify element attribute value [target] ("", "", "0");

6.2.42. Verify Element Attribute Value By Regex

Verify if the mobile element has an attribute with the name and suitable value by regex.

  • Target: Select UIObject that you defined in Object Repositories.
  • Data Input:
    • attributeName: such as id, name, class, text… 
    • regex: A regular expression (shortened as regex or regexp; sometimes referred to as rational expression) is a sequence of characters that specifies a search pattern in text
    • timeouts: is waiting time for returning result(s). 
  • Syntax: verify element attribute value by regex [target] ("", "", "0");

6.2.43. Verify Element Attribute Value Different From

Verify if the mobile element has an attribute different with the name and value.

  • Target: Select UIObject that you defined in Object Repositories.
  • Data Input:
    • attributeName: such as id, name, class, text… 
    • valueToAvoid: input the value you don’t want attribute name equal.
    • Input timeouts: is waiting time for returning result(s).  
  • Syntax: verify element attribute value different from [target] ("", "", "0");

6.2.44. Verify Element Disabled

Verify if the given element is disabled.

  • Target: Select UIObject that you defined in Object Repositories.
  • Data Input: timeouts: is waiting time for returning result(s).
  • Syntax: verify element disabled [target] ("0");

6.2.45. Verify Element Enabled

Verify if the given element is enable.

  • Target: Select UIObject that you defined in Object Repositories.
  • Data Input: timeouts: is waiting time for returning result(s).
  • Syntax: verify element enabled [target] ("0");

6.2.46. Verify Element Has Attribute

Verify if the mobile element has an attribute with the specified name.

  • Target: Select UIObject that you defined in Object Repositories.
  • Data Input:
    • attributeName: such as id, name, class…. 
    • Input timeouts: is waiting time for returning result(s) 
  • Syntax: verify element has attribute [target] ("", "0");

6.2.47. Verify Element In View Port

Verify if the mobile element in view port within the given time (in second).

  • Target: Select UIObject that you defined in Object Repositories.
  • Data Input: timeouts: is waiting time for returning result(s) 
  • Syntax: verify element in view port [target] ("0");

6.2.48. Verify Element Not Has Attribute

Verify if the mobile element doesn’t have an attribute with the specified name.

  • Target: Select UIObject that you defined in Object Repositories.
  • Data Input:
    • attributeName: such as id, name, class…. 
    • timeouts: is waiting time for returning result(s) 
  • Syntax: verify element not has attribute [target] ("", "0");

6.2.49. Verify Element Not Present

Verify if the given mobile element does NOT present on the DOM.

  • Target: Select UIObject that you defined in Object Repositories.
  • Data Input: timeouts: is waiting time for returning result(s) 
  • Syntax: verify element not present [target] ("0");

6.2.50. Verify Element Not Selected

Verify if the element are not selected.

  • Target: Select UIObject that you defined in Object Repositories.
  • Data Input: timeouts: is waiting time for returning result(s) 
  • Syntax: verify element not selected [target] ("0");

6.2.51. Verify Element Not Visible

Verify if given mobile element is NOT visible even it presents on the DOM.

  • Target: Select UIObject that you defined in Object Repositories.
  • Data Input: timeouts: is waiting time for returning result(s) 
  • Syntax: verify element not visible [target] ("0");

6.2.52. Verify Element Present

Verify if the given mobile element does present on DOM.

  • Target: Select UIObject that you defined in Object Repositories.
  • Data Input: timeouts: is waiting time for returning result(s) 
  • Syntax: verify element selected [target] ("0");

6.2.53. Verify Element Selected

Verify if the element are selected.

  • Target: Select UIObject that you defined in Object Repositories.
  • Data Input: timeouts: is waiting time for returning result(s) 
  • Syntax: verify element text [target] ("", "true", "true", "0");

6.2.54. Verify Element Text

Verify text of an element equal with expected text input.

  • Target: Select UIObject that you defined in Object Repositories.
  • Data Input:
    • expectedText: In the example above, the title has text “Title” and we use Key word “Verify Element Text” to verify exactly the text must be “Title” 
    • trimText: Yes/No remove spaces before and after the string, leaving only spaces between words 
    • ignoreCase: Yes/No skip the uppercase, lowercase word case check 
    • input timeouts: It is waiting time for returning result(s). 
  • Syntax: verify element text [target] ("", "true", "true", "0");

6.2.55. Verify Element Text By Regex

Verify text contains of an element regex

  • Target: Select UIObject that you defined in Object Repositories.
  • Data Input:
    • regex: A regular expression (shortened as regex or regexp; sometimes referred to as rational expression) is a sequence of characters that specifies a search pattern in text.
    • timeouts: is waiting time for returning result(s) 
  • Syntax: verify element text by regex [target] ("", "0");

6.2.56. Verify Element Text Different From

Verify text of an element different with text input.

  • Target: Select UIObject that you defined in Object Repositories.
  • Data Input:
    • textToAvoid: the text you want to avoid it 
    • trimText: Boolean type: yes/no remove spaces before and after the string, leaving only spaces between words 
    • IignoreCase: Boolean type: yes/no skip the uppercase, lowercase word case check 
    • timeouts: is waiting time for returning result(s) 
  • Syntax: verify element text different from [target] ("", "true", "true", "0");

6.2.57. Verify Element Visible

Verify if the given mobile element is visible.

  • Target: Select UIObject that you defined in Object Repositories.
  • Data Input: timeouts: is waiting time for returning result(s) 
  • Syntax: verify element visible [target] ("0");

6.2.58. Wait For Element Disabled

Wait for element disabled within a time in second unit.

  • Target: Select UIObject that you defined in Object Repositories.
  • Data Input: timeouts: is waiting time for returning result(s) 
  • Syntax: wait for element disabled [target] ("0") => output;

6.2.59. Wait For Element Enabled

Wait for element enabled within a time in second unit.

  • Target: Select UIObject that you defined in Object Repositories.
  • Data Input: timeouts: is waiting time for returning result(s) 
  • Syntax: wait for element enabled [target] ("0") => output;

6.2.60. Wait For Element In View Port

Wait for the given element in view port within the given time (in second).

  • Target: Select UIObject that you defined in Object Repositories.
  • Data Input: timeouts: is waiting time for returning result(s) 
  • Syntax: wait for element in view port [target] ("0") => output;

6.2.61. Wait For Element Not In View Port

Wait for the given element NOT in view port within the given time (in second).

  • Target: Select UIObject that you defined in Object Repositories.
  • Data Input: timeouts: is waiting time for returning result(s) 
  • Syntax: wait for element not in view port [target] ("0") => output;

6.2.62. Wait For Element Not Present

Wait for the given element to NOT present (appear) within the given time (in second).

  • Target: Select UIObject that you defined in Object Repositories.
  • Data Input: timeouts: is waiting time for returning result(s) 
  • Syntax: wait for element not present [target] ("0") => output;

6.2.63. Wait For Element Not Selected

Wait for the given element are NOT selected with in the given time (in second).

  • Target: Select UIObject that you defined in Object Repositories.
  • Data Input: timeouts: is waiting time for returning result(s) 
  • Syntax: wait for element not selected [target] ("0") => output;

6.2.64. Wait For Element Not Visible

Wait until the given mobile element is NOT visible within a timeout.

  • Target: Select UIObject that you defined in Object Repositories.
  • Data Input: timeouts: is waiting time for returning result(s) 
  • Syntax: wait for element not visible [target] ("0") => output;

6.2.65. Wait For Element Present

Wait for the given element to present within the given time (in second).

  • Target: Select UIObject that you defined in Object Repositories.
  • Data Input: timeouts: is waiting time for returning result(s) 
  • Syntax: wait for element present [target] ("0") => output;

6.2.66. Wait For Element Selected

Wait for the given element are selected within the given time (in second).

  • Target: Select UIObject that you defined in Object Repositories.
  • Data Input: timeouts: is waiting time for returning result(s) 
  • Syntax: wait for element selected [target] ("0") => output;

6.2.67. Wait For Element Visible

Wait until the given mobile element is visible within the timeout.

  • Target: Select UIObject that you defined in Object Repositories.
  • Data Input: timeouts: is waiting time for returning result(s) 
  • Syntax: wait for element visible [target] ("0") => output;