Step syntax
Write your steps in plain English, using the syntaxes described below (the word the is optional). You can type steps in the editor or compose them in the step editing pane.
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.
Supported steps
The following steps are supported:
Identify an object by text
The following object types can be described more specifically by a name, a text string:
button, checkbox, combo box, input, radio button, text box, toggle.
To add an object's name in the step, add the identification text before the object type.
The identification text can be a parameter, a constant (in quotes), or a rule. Use rules and regular expressions to describe text whose value in the application is not always the same. For details, see Use rules and regular expressions.
To use a parameter, type @ and then type the parameter's name, select an existing parameter from the list, or click + New parameter to create one.
Tip: In the script editor steps, a class and its identification text may be highlighted together. For example, . Press the Backspace key twice to delete the text and class together.
Syntax
The syntax is described with the Click action, but other actions are supported in the same way.
Identification text type | Syntax |
---|---|
Constant | Click/press/tap the "<text for identification>" <object type>/text
|
Rule, non text object |
|
Rule, text object |
|
Regular expression, non text object |
|
Regular expression, non text object |
|
Tip:
-
Only use regular expressions if the predefined rules are not sufficient.
-
Use Python regular expression syntax.
-
If the identification text is longer than your regular expression pattern, use wildcards to represent any characters in the text that might come before or after your pattern.
Examples
-
Click the "SIGN IN" button
Click the Button whose name ends with "Total"
-
Click the Button whose name matches "\w+\s\d+\,\s\d+"
-
Verify that the value of the input whose name contains "Total" contains "$49.99"
-
Click the Text that contains "Total"
-
Verify that the text that contains "Total" contains "$49.99"
-
Enter "joe@OT.com" into the input whose name begins with "user name"
Syntax details
The table below describes the syntax for each step.
For simplicity, most of the syntaxes for operations on objects include '<text for identification>', because it is commonly used. However, this text is optional, as described in Identify an object by text.
Step | Description |
---|---|
Call function |
Call a custom JavaScript function. For details, see Call a custom function. Syntax: The number of argument name and value pairs must match the function signature. Examples:
|
Select a checkbox: Syntax: Example: Check the checkbox |
|
Perform a Click / Press / Tap operation on the object. Syntax: Example: Click the bell |
|
Enter |
Replace the value in an input object with the specified string: Syntax: Note: You can also replace the word Example: Enter "MyName" into "USER NAME" input |
Go back |
Go back to the previous page. Syntax: Go back |
Hover |
Hold the pointer over the object for 2 seconds. Syntax: Note: You can also omit the word Example: Hover over the shopping_cart |
Navigate |
In the browser, go to a specified website. Syntax: Example: Navigate to https://www.google.com/ |
Search |
Search for the specified text. Syntax: Example: Search for "Wikipedia" |
Select |
Select a radio button: Syntax: 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: Example: Set 1 into @Outpara1
Assign the value of an input parameter to an output parameter. Syntax: Example: Set @Inputpara1 into @Outputpara1
Assign the value of an AI object to an output parameter. Syntax:
Examples:
|
Toggle |
Turn a switch On or Off. Syntax: Example: |
Type |
Type the specified string into a text object, after clicking approximately in the center of the object. Syntax: Note: You can also replace the word Example: Type "The boy's shirt" into "ITEM" input |
|
Clear a checkbox: Syntax: Example: Uncheck the 'web-based' checkbox |
Wait |
Instruct a script to wait for a few seconds. Syntax: Example: Wait 6 seconds |
Verification steps
You can create different types of verification steps, checking an object's existence, status, or value, or checking the value of a parameter. For details, see Add verification steps.
Tip: In the verification step syntax, the word that within Verify that is optional.
Verify that an object exists or does not exist
Syntax
Condition | Syntax |
---|---|
Exists |
|
Does not exist | Verify that the '<text for identification>' <object type> does not exist
|
Examples:
-
Verify that the alarm exists
-
Verify the 'INPUT' button does not exist
Verify the state of a object
Syntax
Condition | Syntax |
---|---|
On (Toggle) |
|
Off (Toggle) | Verify that the "<text for identification>" toggle is off
|
Selected (Radio button) | Verify that the "<text for identification>" radio_button is selected
|
Not selected (Radio button) | Verify that the '<text for identification>' radio_button is not selected
|
Checked (Check box) | Verify that the '<text for identification>' checkbox is checked
|
Not checked (Check box) |
|
Examples
-
Verify that the 'AM' radio_button is selected
-
Verify the 'light switch' toggle_button is on
Verify the value of an object
-
You can verify whether the value is empty or not, and whether it is or isn't equal, containing, or within a specified string. The string you specify can be a parameter or a constant.
-
If you have an
Aviator license, you can use a Smart Verify step, in which you can describe, in plain English, anything you want to check about the value.
-
To use a parameter in the condition (for Verify or Smart Verify), type @ and then type the parameter's name, select an existing parameter from the list, or click + New parameter to create one.
Syntax
Condition | Syntax |
---|---|
Smart Verify |
|
Equal | Verify that the value of '<text for identification>' <object type> is "<value>"
|
Not equal | Verify that the value of '<text for identification>' <object type> is not '<value>'
|
Contains |
|
Not contain |
|
Within |
(The |
Not within |
(The |
Empty |
(The |
Not Empty |
Verify that the value of "<text for identification>" <object type> is not empty
|
Examples
-
Smart Verify the value of "Email" input is a valid email address and is part of the opentext domain
-
Smart Verify that the value of "Date" input is earlier than 2030 and follows the DD/MM/YYYY format
-
Verify that the value of "Username" input is "John"
-
Verify that the value of "Username" input is not "John"
-
Verify that the value of "Username" input contains "John"
-
Verify that the value of "John" Text within "Good Morning John"
-
Verify that the value of "Password" input is empty
Verify the value of a parameter
-
You can verify whether the value is empty or not, and whether it is or isn't equal, containing, or within a specified string. The string you specify can be a parameter or a constant.
-
To use a parameter in the condition, type @ and then type the parameter's name, select an existing parameter from the list, or click + New parameter to create one.
Syntax
Condition | Syntax |
---|---|
Smart Verify |
|
Equal | Verify that the value of @<parameter name> is "<value>"
|
Not equal | Verify that the value of @<parameter name> is not '<value>'
|
Contains |
|
Not contain |
|
Within |
(The |
Not within |
(The |
Empty |
(The |
Not Empty |
Verify that the value of @<parameter name> is not empty
|
Examples
-
Smart Verify the value of @email is a valid email address and is part of the opentext domain
-
Verify that the value of @username is "John"
-
Verify that the value of @username is not "John"
-
Verify that the value of @username contains "John"
-
Verify that the value of @username within "Good Morning John"
-
Verify that the value of @password is empty
If/Else statements
Use an If step if you want script steps to run conditionally. Else statements are optional.
You can create condition steps that check an object's existence or status, or steps that check the value of an object or parameter. For details, see Add conditional steps.
Check an object's existence:
Syntax
Condition | Syntax |
---|---|
Exists |
|
Does not exist |
|
Examples:
If the menu exists
Click the menu
Else
Click the 'Close' buttonIf the menu does not exist
Click the 'Close' button
Else
Click the menu
Check an object's state:
Checking an object's state is supported only for radio_button, checkbox, and toggle.
Syntax
Condition | Syntax |
---|---|
On (Toggle) | If the '<text for identification>' toggle is on
|
Off (Toggle) | If the '<text for identification>' toggle is off
|
Selected (Radio button) |
|
Not selected (Radio button) |
|
Checked (Check box) |
|
Not checked (Check box) |
|
Examples
-
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
Check an object or parameter's value:
You can check whether the value is empty or not, and whether it is or isn't equal, containing, or within a specified string. The string you specify can be a parameter or a constant.
To use a parameter in the condition, type @ and then type the parameter's name, select an existing parameter from the list, or click + New parameter to create one.
Syntax
The syntax shown below is for checking the value of an object. To check the value of a parameter, replace the '<text for identification>' <object type>
with @<parameter name>
.
Condition | Syntax |
---|---|
Equal | If the value of '<text for identification>' <object type> is '<value>'
|
Not equal | If the value of '<text for identification>' <object type> is not "<value>"
|
Contains |
|
Not contain |
|
Within |
(The |
Not within |
(The |
Empty |
(The |
Not Empty |
If the value of "<text for identification>" <object type> is not empty
|
Examples
-
If the value of "Open Hours" text_box is "AM"
Enter "8:00" into the "start hour" input
Enter "11:00" into the "end hour" input
Click the 'Save' button -
If the value of "Username" input is empty
Enter "MyName" in the 'Username' input
Enter "MyPassword" in the 'Password' input
Else
Enter "MyPassword" in the 'Password' input
Click the 'Save' button -
If the value of the Text contains 'MyCompany'
Click the 'Add to cart' button -
If the value of @CompanyName contains 'MyCompany'
Click the 'Add to cart' button
See also: