Web Commands

List of all web commands:

Commands:
clickscrolldragAndDrop
inputjavascriptrepeat
dropDownincludehovers
navigatewaitimage
assertclearswitchToFrame
scrollTotabhotKey
repeatdoubleClick

<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. 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. 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

Also, using the <input> command, we have the opportunity to insert an image file of the desired format (for example, add an account photo).

To implement this function, the desired image must be located in the same folder as your test scenario, for example, in a folder called scenario.

XML
Copy

Description: command to select from the drop-down list menu

Option to choose: oneValue or allValues;

Required parameters:

  1. comment
  2. locator of the dropDown element

oneValue:

  1. type – select or deselect
  2. by – options how to select: a)Text; b)Value; c)Index
  3. value – non-empty string value that represents one of the “by” selector values

allValues:

  1. type – deselect

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

Description: command to perform navigation

Required parameters:

  1. comment
  2. command (back, reload or to)

Optional param:

  1. path – if the command “to” string path should be provided
  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

<assert>

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

There are seven types:

  • attribute - assert by any UI element's attribute
  • title - assert by title of the page
  • equal - equality of two or more values is checked
  • notEqual - the inequality of two or more values is checked
  • checked - verifies if checkboxes or radio buttons are selected
  • present - checks if an element exists on the page
  • alert - verifies the presence and content of alert messages

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. title

    1. comment
      1. content - title of the page
  3. equal

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

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

    1. _ comment _
      1. text - alert text for comparison
  6. checked

    1. comment
      1. locator - locator of the UI element
  7. present

    1. comment
      1. locator - locator of the UI element
XML
Copy

You can assert several elements within one <assert>:

XML
Copy

<scrollTo>

Description: command to perform scroll-to-element action

Required parameters:

  1. comment
  2. locator – locator of the element to which scroll to action will be performed

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

<scroll>

Description: command to perform scroll action

Required parameters:

  1. comment
  2. type – a type of the scroll
    1. page - scrolling the whole page
    2. inner - scrolling inside an element on the page
  1. value – a value of the scroll

Optional parameters:

  1. direction – up or down. Down is default
  2. measure – how value is measured (pixels or percent). Pixels are default.
  3. locator – if a type is “inner”, the locator for an element is needed to be provided
  4. condition - condition according to which this test step will or won't be executed
  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
  6. 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

<javascript>

Description: command to execute user's javascript commands

Required parameters:

  1. comment
  2. file – file with js commands

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

<include>

Description: 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

<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. clickable - pauses execution until a specific element on a webpage or interface becomes clickable, or as much as was specified in the time field, but in the case when the element was not defined as a clickable for a specified time, wait step will fail. The presence of the specified element in the DOM of the page is mandatory, otherwise the element will be determined as not found

    1. comment
    2. locator
  2. visible - pauses until a specific element becomes visible on a webpage or interface, which means that the element is in the DOM of the page, but it is defined as invisible (for example: an element that must be hovered over to see it style="display: none;")

    1. comment
    2. locator
  3. unit – seconds or milliseconds. Seconds are used as default if the unit param is not used

  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

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

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
  4. highlight - boolean, where 'true' means cleared text will be highlighted with a grey body and 3px solid yellow border
XML
Copy

<tab>

Description: command to perform operations with tabs

There are three types:

  • close
  • switch
  • open

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

Required parameters according to the type:

  1. close

    1. index - index of tab that should be closed. (If you do not specify the index, it will be close current tab)
  2. switch

    1. index - switch to tab with selected index.
  3. open

    1. url - open a tab via specified URL
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. toLocator - locator id of the place, where you need to drop an element
  3. fromLocator - locator id of the element which you need to drag and drop

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. fileName - if you need to upload the file, you can put file name in this parameter, file must be in the same path as scenario
  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

fromLocator

XML
Copy

It is also possible to upload any file to the site due to this command.

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 web <repeat> command you can use any web commands.

<hover>

Description: command to perform hover action

Required parameters:

  1. comment
  2. locator of the UI element you want to perform hover action with

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 three types:

  • fullScreen (compare a full screenshot)
  • picture (compare image file by locator)
  • 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. exclude - excluding element by locator from screenshot comparison
      1. locator - locator of the specific element
  2. picture

    1. locator - locator of the specific image element
    2. attribute - image source attribute name. DEFAULT=src
  3. 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)
when you configure the exclude and turn on highlightDifference="true", in the case that the image does not match, the excluded zone will be highlighted in orange, and the area that has not yet matched will be highlighted in red (on the screen above)

when you configure the exclude and turn on highlightDifference="true", in the case that the image does not match, the excluded zone will be highlighted in orange, and the area that has not yet matched will be highlighted in red (on the screen above)

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

Also, using the command, you can check the display of the image of some element:

XML
Copy

<switchToFrame>

The command that allows you to work in another frame

After closing the tag, you can continue to use locators inside the page.

XML
Copy

<hotKey>

The command responsible for individual keys or their combinations that are on the keyboard

There is a division of commands without locators and with locators.

Tags are used with locators

  1. copy
  2. cut
  3. paste
  4. highlight
XML
Copy

And the others without using a locator, but using times - the number of executions (default value - 1) :

  1. tab
  2. space
  3. backspace
  4. escape
  5. enter
XML
Copy

The WEB tag are the main interpreter containing the set of all tags for interacting with the user interface, which will be described below. You can use third-party link navigation.

Tag's usage example:

XML
Copy

<doubleClick>

Description: command to perform double click

Required parameters:

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

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
Type to search, ESC to discard
Type to search, ESC to discard
Type to search, ESC to discard