Native Apps

List of all native commands:

Commands:
  • click
  • input
  • assert
  • wait
  • clear
  • image
  • refresh
  • navigate
  • dragAndDrop
  • swipe
  • webView
  • repeat

<click>

Description: command to perform click

Required parameters:

  1. comment
  2. locator – locator, where the click will be performed

Optional parameters:

  1. method – click method (selenium or javascript)
  2. highlight – boolean, where 'true' means imputed text will be highlighted with a grey body and 3px solid yellow border
  3. condition - condition according to which this test step will or won't be executed
  4. threshold - parameter, where the maximum execution time of the command is defined (milliseconds), if the execution time is exceeded, the step will be defined as failed
  5. locatorStrategy - to select the type of locator, if necessary writing it directly in the field for locator (locatorId - default value) more in Locators tab
XML
Copy

<input>

Description: command to enter a value into the specific field (requires a locator of this field)

Required parameters:

  1. comment
  2. locator of the field into which a value will be inputted
  3. value – non-empty string

Optional parameters:

  1. highlight – boolean, where 'true' means imputed text will be highlighted with a grey body and 3px solid yellow border
  2. condition - condition according to which this test step will or won't be executed
  3. threshold - parameter, where the maximum execution time of the command is defined (milliseconds), if the execution time is exceeded, the step will be defined as failed
  4. locatorStrategy - to select the type of locator, if necessary writing it directly in the field for locator (locatorId - default value) more in Locators tab
XML
Copy

<clear>

Description: command to clear the data that has been entered in the specific field (requires a locator of this field)

Required parameters:

  1. comment
  2. locator of the field which must be cleared
  3. highlight - boolean, where 'true' means cleared text will be highlighted with a grey body and 3px solid yellow border

Optional parameters:

  1. condition - condition according to which this test step will or won't be executed
  2. threshold - parameter, where the maximum execution time of the command is defined (milliseconds), if the execution time is exceeded, the step will be defined as failed
  3. locatorStrategy - to select the type of locator, if necessary writing it directly in the field for locator (locatorId - default value) more in Locators tab
XML
Copy

<image>

Description: command to take a screenshot and compare it with the expected result

There are two types:

  • fullScreen (compare a full screenshot)
  • part (compare a part screenshot of the specific element by locator)

Required attribute for each type:

  1. comment
  2. file - expected image file to compare with screenshot

Optional attribute for each type :

  1. condition - condition according to which this test step will or won't be executed
  2. threshold - parameter, where the maximum execution time of the command is defined (milliseconds), if the execution time is exceeded, the step will be defined as failed
  3. highlightDifference - parameter that turns on/off highlighting of difference

Required parameters according to the type:

  1. fullScreen

    1. percentage - the percentage of accuracy of the screenshot comparison, where 100% is the comparison of the entire screenshot (if not indicated it will be considered as 100)
  2. part

    1. locator - locator of the specific element what to compare
    2. percentage - the percentage of accuracy of the screenshot comparison, where 100% is the comparison of the entire screenshot (if not indicated it will be considered as 100)

NOTE:

Image comparison is a test feature. On multiple devices, the same window can have different dimensions so the comparison will be failed. Comparison of specific elements works fine due to our tests.

XML
Copy

<refresh>

Description: command to refresh the app if it has such functionality as “swipe down to refresh”

Required parameters:

  1. comment

Optional parameters:

  1. condition - condition according to which this test step will or won't be executed
  2. threshold - parameter, where the maximum execution time of the command is defined (milliseconds), if the execution time is exceeded, the step will be defined as failed
XML
Copy

Description: command to perform navigation

Required parameters:

  1. comment
  2. destination – how to perform navigation. Has three types:
    1. home
    2. back
    3. overview

Optional parameters:

  1. condition - condition according to which this test step will or won't be executed
  2. threshold - parameter, where the maximum execution time of the command is defined (milliseconds), if the execution time is exceeded, the step will be defined as failed
  3. NOTE: Overview destination works only on Android devices and cannot be applied to IOS.
XML
Copy

<dragAndDrop>

Description: command that allows you to check by clicking on an object and dragging it to another location

Required parameters:

  1. comment
  2. fromLocator - locator id of the element which you need to drag and drop
  3. toLocator - locator id of the place, where you need to drop an element

Optional parameters:

  1. condition - condition according to which this test step will or won't be executed
  2. threshold - parameter, where the maximum execution time of the command is defined (milliseconds), if the execution time is exceeded, the step will be defined as failed
XML
Copy

<swipe>

Description: command to perform a swipe gesture

Required parameters:

  1. comment

  2. direction – the direction of the swipe

    1. down
    2. left
    3. right
    4. up
  3. type – a type of swipe: element or page

    1. element
    2. page

Optional parameters:

  1. locator - if 'element' type is chosen, you have to specify locator of the UI element, which has to be swiped
  2. percent – percent value of the swipe due to the screen dimensions. From 1-100%. The default value is 70 if percent isn`t declared.
  3. quantity – the number of swipes to be performed in the chain. Integer value. The default value is 1 if quantity isn`t declared
  4. condition - condition according to which this test step will or won't be executed
  5. threshold - parameter, where the maximum execution time of the command is defined (milliseconds), if the execution time is exceeded, the step will be defined as failed
  6. locatorStrategy - to select the type of locator, if necessary writing it directly in the field for locator (locatorId - default value) more in Locators tab
XML
Copy

<webView>

Description: command to switch to the web view

Required parameters:

  1. comment

Optional parameters:

  1. condition - condition according to which this test step will or won't be executed
  2. threshold - parameter, where the maximum execution time of the command is defined (milliseconds), if the execution time is exceeded, the step will be defined as failed
XML
Copy

<assert>

Description: command to check whether the data is entered or the element is displayed on the page

There are three types:

  • attribute - assert by any UI element's attribute
  • equal - equality of two or more values is checked
  • notEqual - the inequality of two or more values is checked

Required attribute for each type:

  1. comment

Optional attribute for each type :

  1. condition - condition according to which this test step will or won't be executed
  2. threshold - parameter, where the maximum execution time of the command is defined (milliseconds), if the execution time is exceeded, the step will be defined as failed
  3. locatorStrategy - to select the type of locator, if necessary writing it directly in the field for locator (locatorId - default value) more in Locators tab
  4. negative - when 'true' is selected, it is checked that the expected and actual content do not match (default value - false)

Required parameters according to the type:

  1. attribute

    1. comment
    2. locator - locator of the UI element
    3. name - name of attribute
      1. content - content of the attribute
  2. equal

    1. comment
      1. content - values for comparison (The minimum number must be two)
  3. notEqual

    1. comment
      1. content - values for comparison (The minimum number must be two)
XML
Copy

You can assert several elements within one <assert>:

XML
Copy

<wait>

Description: command that pauses the passage of the scenario to perform a certain function that requires a wait. The scenario continues running in the usual way after this command

Required parameters:

  1. comment
  2. time – integer value

Optional parameters:

  1. unit – seconds or milliseconds. Seconds are used as default if the unit param is not used
  2. condition - condition according to which this test step will or won't be executed
  3. threshold - parameter, where the maximum execution time of the command is defined (milliseconds), if the execution time is exceeded, the step will be defined as failed
XML
Copy

<repeat>

Description: command that allows you to repeat any action used in the commands

Required parameters:

  1. comment

Optional parameters:

  1. condition - condition according to which this test step will or won't be executed
  2. threshold - parameter, that set maximum allowed test step execution time
  3. times - is to set the number of repeating (not used with variations)
  4. variations - attribute for the variations file (not used with times)
XML
Copy

Inside the native <repeat> command you can use any native commands.

<include>

Description: the command that allows you to run a ‘scenario inside a scenario’ (often used to bundle different scenarios)

Required parameters:

  1. comment
  2. scenario - path to the scenario you need to launch. Since all scenarios must be stored in 'scenarios' folder, in this parameter you need specify path to your scenario from 'scenario' folder

Optional parameters:

  1. condition - condition according to which this test step will or won't be executed
  2. threshold - parameter, that set maximum allowed test step execution time
XML
Copy
Type to search, ESC to discard
Type to search, ESC to discard
Type to search, ESC to discard