Synthetic transaction commands
Synthetic transaction commands are used to define what your Synthetic transaction will 'do' to test your website. When you add a Synthetic transaction , you define the steps your Synthetic transaction will take through these commands.
The commands you provide include associated keyphrase tokens. Keyphrase tokens can contain from 1 to 3 keyphrases. Only a valid combination of all associated keyphrase tokens makes up a command. You can enter a command by completing one of the following methods.
-
Picking a suggested element from the autocomplete options
-
Typing or pasting a custom CSS selector
-
Entering a command with a valid XPATH() selector
In this topic, the Synthetic transaction commands are separated into Instructions and Assertions. See the tables below for a full list of commands that can be used in your Synthetic transaction definition.
Instructions
Instructions have your Synthetic transaction complete an action, such as going to a specified URL or clicking a hypertext link. See the table below for a full list of Instructions that can be used in your Synthetic transaction definition.
| Command | Explanation |
|---|---|
| Go to url URL | Directs the browser to navigate to the URL. This must be the first step in the Synthetic transaction, but can also be used for subsequent steps. |
| click element | Clicks the provided element. |
| click XPATH() | Clicks the provided XPATH() selector. |
| fill in field element with text/secret | Fills the provided text field element with the provided text value. |
| fill in field XPATH() with text/secret | Fills the provided XPATH() selector field with the text provided value. |
| check radio/checkbox | Checks the provided radio/checkbox element. |
| uncheck radio/checkbox | Unchecks the provided radio/checkbox element. |
| sleep for number seconds | Waits for the amount of time set in seconds before resuming. |
| select dropdown element with item | Locates the provided select element and selects the provided item option from it. |
| select dropdown XPATH() with item | Locates the provided select XPATH() selector and selects the provided item option from it. |
| submit form form | Triggers a submit action on the provided form element. |
| wait for element element to exist for |
Waits for the provided element to exist within the specified time in seconds. If the element exists before the time limit has expired, the step is successful and the transaction will continue to the next step.
|
| wait for XPATH() to exist for | Waits for the provided XPATH() selector to exist within the specified time in seconds. |
| wait for element element to contain text text | Waits for the element that matches the text given in element to contain the text given in text. |
| wait for XPATH() to contain text text | Waits for the element that matches the text given in the XPATH() selector to contain the text given in text. |
API instructions
| Command | API Command |
|---|---|
| Go to url URL |
OPEN
|
| click element |
CLICK
|
| click XPATH() |
CLICK
|
| fill in field element with text/secret |
TYPE
|
| fill in field XPATH() with text/secret |
|
| check radio/checkbox |
CHECK
|
| uncheck radio/checkbox |
UNCHECK
|
| sleep for number seconds |
PAUSE
|
| select dropdown element with item |
SELECT
|
| select dropdown XPATH() with item |
SELECT
|
| submit form form |
SUBMIT
|
| wait for element element to exist for |
WAIT_FOR_ELEMENT_PRESENT
|
| wait for XPATH() to exist for |
WAIT_FOR_ELEMENT_PRESENT
|
| wait for element element to contain text text |
SWO_WAIT_FOR_ELEMENT_TEXT_CONTAINS
|
| wait for XPATH() to contain text text |
SWO_WAIT_FOR_ELEMENT_TEXT_CONTAINS
|
iframe instructions
Use the select frame commands to select specific iframes within your website, or navigate within iframes.
| Command | Explanation | Example |
|---|---|---|
| select frame XPATH() | Selects the specified iframe. | select frame XPATH(//*[@id="mc-main-content"]/p[2]/span/iframe) |
| select frame TOP_FRAME | Selects the iframe one level up to the parent of the frame. | select frame TOP_FRAME |
| select frame PARENT_FRAME | Selects the parent frame of the specified iframe. | select frame PARENT_FRAME |
API iframe instructions
| Command | API Command |
|---|---|
| select frame XPATH() |
SELECT_FRAME
|
| select frame TOP_FRAME |
SELECT_FRAME
|
| select frame PARENT_FRAME |
SELECT_FRAME
|
Validations
Validations are similar to instructions and can be used in your Synthetic transaction definition to validate an aspect of your website. See the table below for a full list of validations that can be used in your Synthetic transaction definition.
| Command | Explanation |
|---|---|
| URL should be URL | Asserts that the current URL matches the one given in URL. |
| element should exist | Asserts that there is an element that matches the provided text element. |
| XPATH() should exist | Asserts that there is an element that matches the provided XPATH() selector. |
| element should not exist | Asserts that there is not an element that matches the provided text given in element. |
| XPATH() should not exist | Asserts that there is not an element that matches the provided text given in XPATH(). |
| element should contain text | Asserts that the first provided text element contains the value given in text. |
| XPATH() should contain text | Asserts that the first provided text element contains the value given in XPATH(). |
| element should not contain text | Asserts that the first provided text element does not contain the value given in text. |
| XPATH() should not contain text | Asserts that the first provided text element XPATH() does not contain the value given in text. |
| Assert checked radio/checkbox | Asserts that the first provided checkbox or radio is considered as checked. |
| Assert not checked radio/checkbox | Asserts that the first provided checkbox or radio is not considered as checked. |
| Drop-down element with value value should be selected | Asserts that the first element has the drop-down option given in value as selected. |
| Drop-down XPATH() with value value should be selected | Asserts that the first element XPATH() has the drop-down option given in value as selected. |
| Drop-down element with value value should not be selected | Asserts that the first element does not have the drop-down option given in value as the selection. |
| Drop-down XPATH() with value value should not be selected | Asserts that the first element XPATH() does not have the drop-down option given in value as the selection. |
API Validations
| Command | API Command |
|---|---|
| URL should be URL |
SWO_ASSERT_URL
|
| element should exist |
ASSERT_ELEMENT_PRESENT
|
| XPATH() should exist |
ASSERT_ELEMENT_PRESENT
|
| element should not exist |
ASSERT_ELEMENT_NOT_PRESENT
|
| XPATH() should not exist |
ASSERT_ELEMENT_NOT_PRESENT
|
| element should contain text |
SWO_ASSERT_TEXT_CONTAINS
|
| XPATH() should contain text |
SWO_ASSERT_TEXT_CONTAINS
|
| element should not contain text |
SWO_ASSERT_TEXT_NOT_CONTAINS
|
| XPATH() should not contain text |
SWO_ASSERT_TEXT_NOT_CONTAINS
|
| Assert checked radio/checkbox |
ASSERT_CHECKED
|
| Assert not checked radio/checkbox |
ASSERT_NOT_CHECKED
|
| Drop-down element with value value should be selected |
ASSERT_SELECTED_VALUE
|
| Drop-down XPATH() with value value should be selected |
ASSERT_SELECTED_VALUE
|
| Drop-down element with value value should not be selected |
ASSERT_NOT_SELECTED_VALUE
|
| Drop-down XPATH() with value value should not be selected |
ASSERT_NOT_SELECTED_VALUE
|
| Element {element} should not have {text} |
ASSERT_NOT_TEXT
|
| Element {element} should have {text} |
ASSERT_TEXT
|
| Text field {element} should have {text} |
ASSERT_VALUE
|
| Text field {element} should contain {text} |
SWO_ASSERT_VALUE_CONTAINS
|
| Text field {element} should not contain {text} |
SWO_ASSERT_VALUE_NOT_CONTAINS
|