Step syntax
Write your steps in plain English, using the syntaxes described below (the words the and that are optional).
You can use single quotes or double quotes to enclose a string. The string can also contain quotes, but these quotes must be a different type than the quotes enclosing the string.
In this topic:
Supported actions
The following actions are supported:
Back to top
Identify a control by text
The following control types can be described more specifically by a name, a text string:
button, checkbox, combo box, input, radio button, text box, toggle.
To add a control's name in the step, add the identification text, in quotes, before the control type.
For example:
Syntax: Click/press/tap the "<text for identification>" <control type>/text
Example: Click the "SIGN IN" button
Note: Text related to a class may be marked together in the user interface. This example is displayed as . Press the Backspace key twice to delete the text and class together.
Back to top
Syntax details
The table below describes the syntax for each action.
For simplicity, most of the syntaxes include '<text for identification>', because it is commonly used. However, this text is optional, as described in Identify a control by text.
Action |
Description |
Check
|
Select a checkbox:
Syntax: Check the '<text for identification>' check_box
Example: Check the checkbox
|
Click / Press / Tap
|
Perform a Click / Press / Tap operation on the control.
Syntax: Click/press/tap the <control type>
Example: Click the bell
|
Enter |
Replace the value in an input control with the specified string:
Syntax: Enter "<text to enter>" into the '<text for identification>' input/field
Note: You can also replace the word into with in or inside .
Example: Enter "MyName" into "USER NAME" input
|
Go back |
Go back to the previous page.
Syntax: Go back
|
Navigate |
In the browser, go to a specified website.
Syntax: Navigate to <URL>
Example: Navigate to https://www.google.com/
|
Search |
Search for the specified text.
Syntax: Search for "<text to find>"
Example: Search for "Wikipedia"
|
Select |
Select a radio button:
Syntax: Select the '<text for identification>' radio_button
Example: Select the 'web-based' radio_button
|
Set |
Use the Set action to assign different types of values to output parameters.
Assign a constant value to an output parameter.
Syntax: Set "value" into @<output parameter name>
Example: Set 1 into @Outpara1
Assign the value of an input parameter to an output parameter.
Syntax: Set @<input parameter name> into @<output parameter name>
Example: Set @Inputpara1 into @Outputpara1
Assign the value of an AI object to an output parameter.
Syntax:
Example:
|
Toggle |
Turn a switch On or Off.
Syntax: Toggle <State> the toggle_button
Example: Toggle On the toggle_button
|
Type |
Type the specified string into a text control, after clicking approximately in the center of the control.
Syntax: Type "<text to type>" into the "<text for identification>" input/field
Note: You can also replace the word into with in or inside .
Example: Type "The boy's shirt" into "ITEM" input
|
Uncheck
|
Clear a checkbox:
Syntax: Uncheck the '<text for identification>' check_box
Example: Uncheck the 'web-based' checkbox
|
Verify |
You can create different types of verification steps, checking a control's existence, status, or value.
Verify that a control exists or does not exist.
Syntax:
Example:
Verify the state of a control:
Syntax:
-
Verify that the '<text for identification>' toggle is on
-
Verify that the "<text for identification>" toggle is off
-
Verify that the "<text for identification>" radio_button is selected
-
Verify that the '<text for identification>' radio_button is not selected
-
Verify that the '<text for identification>' checkbox is checked
-
Verify that the "<text for identification>" checkbox is not checked
Example:
Verify that the value of a control is, contains, or is within a certain string.
Syntax:
-
Verify that the value of '<text for identification>' <control type> is <value>
-
Verify that the value of '<text for identification>' <control type> contains <value>
-
Verify that the value of "<text for identification>" <control type> within <value>
Example:
-
Verify that the value of "Username" input is "John"
-
Verify that the value of "Username" input contains "John"
-
Verify that the value of "John" Text within "Good Morning John"
Note: You can verify string values of objects. The value can be an input parameter or a constant.
|
Wait |
Instruct a script to wait for a few seconds.
Syntax: Wait <number> seconds
Example: Wait 6 seconds
|
If / Else |
Use an If step if you want script steps to run conditionally. Else statements are optional.
You can create condition steps that check a control's existence or status.
Check a control's existence:
Syntax:
If the <control type> exists
<steps>
Else
<steps>
If the '<text for identification>' <control type> does not exist
<steps>
Else
<steps>
Example:
If the menu exists Click the menu Else Click the 'Close' button
If the menu does not exist Click the 'Close' button Else Click the menu
Check a control's state:
Checking a control's state is supported only for radio_button, checkbox, and toggle.
Syntax:
-
radio_button If the '<text for identification>' radio_button is selected
<steps>
Else
<steps>
If the '<text for identification>' radio_button is not selected
<steps>
-
check_box If the '<text for identification>' checkbox is checked
<steps>
Else
<steps>
If the '<text for identification>' checkbox is not checked
<steps>
-
toggle If the '<text for identification>' toggle is on
<steps>
Else
<steps> If the '<text for identification>' toggle is off
<steps>
Example:
-
If the "All day" toggle is off Enter "8:00" into the "start hour" input Enter "11:00" into the "end hour" input Click the 'Save' button
-
If the 'Use proxy' check_box is checked Enter "12.34.56.78" in the 'Proxy server' input Else Click the 'Save' button
-
If the 'AM' radio_button is selected Select the 'PM' radio_button Else Click the 'Save' button
|
Back to top
See also: