...
Syntax | Action | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
i should be on "<url>" | Will check if the browser is on the specified url. | ||||||||||||
pause | Will show a dialog and only continue execution when the OK button in the dialog is pressed. Useful for pausing the feature and executing some manual actions in the browser. | ||||||||||||
wait for <number> ms i wait for <number> ms | Will wait the number of milliseconds before going to the next step. | ||||||||||||
wait until <descriptor> is visible i wait for <number> ms until <descriptor> is visible i wait for <number> ms or until <descriptor> is visible | Will wait the specified number of milliseconds or until the specified element is visible, whichever comes first. If the number of milliseconds is omitted, then the maximum wait time will be 10 seconds. If the maximum wait time is reached, this step will fail. The descriptor can always be replaced with a parent version: <descriptor> in <descriptor>. | ||||||||||||
wait until <descriptor> exists i wait for <number> ms until <descriptor> exists i wait for <number> ms or until <descriptor> exists | Will wait the specified number of milliseconds or until the specified element is found in the DOM, whichever comes first. If the number of milliseconds is omitted, then the maximum wait time will be 10 seconds. If the maximum wait time is reached, this step will fail. The descriptor can always be replaced with a parent version: <descriptor> in <descriptor>. | ||||||||||||
wait until <descriptor> is not visible i wait for <number> ms until <descriptor> is not visible i wait for <number> ms or until <descriptor> is not visible | Will wait the specified number of milliseconds or until the specified element is not visible, whichever comes first. If the number of milliseconds is omitted, then the maximum wait time will be 10 seconds. If the maximum wait time is reached, this step will fail. The descriptor can always be replaced with a parent version: <descriptor> in <descriptor>. | ||||||||||||
wait until <descriptor> does not exist i wait for <number> ms until <descriptor> does not exist i wait for <number> ms or until <descriptor> does not exist | Will wait the specified number of milliseconds or until the specified element is no longer found in the DOM, whichever comes first. If the number of milliseconds is omitted, then the maximum wait time will be 10 seconds. If the maximum wait time is reached, this step will fail. The descriptor can always be replaced with a parent version: <descriptor> in <descriptor>. | ||||||||||||
highlight <descriptor> i highlight <descriptor> | Will highlight the element for a very short while and will pause the execution (see pause step above). The descriptor can always be replaced with a parent version: <descriptor> in <descriptor>. | ||||||||||||
focus on <descriptor> i focus on <descriptor> i put the focus on <descriptor> | Will put the browser focus on the element matching the descriptor. The descriptor can always be replaced with a parent version: <descriptor> in <descriptor>. | ||||||||||||
remove focus from <descriptor> i remove focus from <descriptor> | Will remove the browser focus from the element matching the descriptor. The descriptor can always be replaced with a parent version: <descriptor> in <descriptor>.
| ||||||||||||
i should see "<message>" | Will verify that the message is present in the page (body of the document); does not check actual visibility.
| ||||||||||||
i should not see "<message>" | Will verify that the message is not present in the page (body of the document); does not check actual visibility.
| ||||||||||||
i see <descriptor> i should see <descriptor> <descriptor> is visible <descriptor> should be visible | Checks that a given element is visible. The descriptor can always be replaced with a parent version: <descriptor> in <descriptor>.
| ||||||||||||
<descriptor> exists <descriptor> should exist | Checks that a given element is present in the DOM. The descriptor can always be replaced with a parent version: <descriptor> in <descriptor>. | ||||||||||||
i do not see <descriptor> i should not see <descriptor> <descriptor> is not visible <descriptor> should not be visible | Checks that a given element is not visible. This performs the sahi check (javascript/css visibility). The descriptor can always be replaced with a parent version: <descriptor> in <descriptor>. | ||||||||||||
<descriptor> does not exist <descriptor> should not exist | Checks that a given element is not present in the DOM. The descriptor can always be replaced with a parent version: <descriptor> in <descriptor>. | ||||||||||||
the following elements are visible: the following elements should be visible: the following elements in <descriptor> are visible: the following elements in <descriptor> should be visible: | This statement should be followed by a table structure of the following form:
This step verifies that all elements in the table are visible. Variation: the keyword elements can also be replaced with fields. The descriptor can always be replaced with a parent version: <descriptor> in <descriptor>. | ||||||||||||
the following elements exist: the following elements should exist: the following elements in <descriptor> exist: the following elements in <descriptor> should exist: | This statement should be followed by a table structure of the following form:
This step verifies that all elements in the table exist in the DOM. The descriptor can always be replaced with a parent version: <descriptor> in <descriptor>. | ||||||||||||
the following elements are not visible: the following elements should not be visible: the following elements in <descriptor> are not visible: the following elements in <descriptor> should not be visible: | This statement should be followed by a table structure of the following form:
This step verifies that none of the elements in the table are visible. Variation: the keyword elements can also be replaced with fields. The descriptor can always be replaced with a parent version: <descriptor> in <descriptor>. | ||||||||||||
the following elements do not exist: the following elements should not exist: the following elements in <descriptor> do not exist: the following elements in <descriptor> should not exist: | This statement should be followed by a table structure of the following form:
This step verifies that none of the elements in the table exist in the DOM. The descriptor can always be replaced with a parent version: <descriptor> in <descriptor>.
| ||||||||||||
the <field> field should contain <value> | Will verify that the text type input field value is equal to the value specified.
| ||||||||||||
<descriptor> should contain "<value>" <descriptor> contains "<value>"
| Verifies that the given element contains the value anywhere in its text. The descriptor can always be replaced with a parent version: <descriptor> in <descriptor>.
| ||||||||||||
<descriptor> should not contain <value> <descriptor> does not contain <value> | Verifies that the given element does not contain the value anywhere in its text. The descriptor can always be replaced with a parent version: <descriptor> in <descriptor>.
| ||||||||||||
the element values contain: the element values should contain: the element values in <descriptor> contain: the element values in <descriptor> should contain: | This statement should be followed by a table structure of the following form:
This step verifies that all elements in the table contain the value anywhere in their text.
| ||||||||||||
the element values do not contain: the element values should not contain: the element values in <descriptor> do not contain: the element values in <descriptor> should not contain: | This statement should be followed by a table structure of the following form:
This step verifies that no element in the table contains the value anywhere in its text.
| ||||||||||||
<value> should be selected in <descriptor> <value> should be selected in <descriptor> in <descriptor> | Will verify a value is selected in a specified dropdown. The element part of the first descriptor can be omitted and select will be assumed. | ||||||||||||
<descriptor> should be chosen <descriptor> should be chosen in <descriptor> | Will verify a radiobutton is selected. The element part of the first descriptor can be omitted and radio will be assumed. | ||||||||||||
<descriptor> should be checked <descriptor> should be checked in <descriptor> | Will verify a checkbox is checked. The element part of the first descriptor can be omitted and checkbox will be assumed. | ||||||||||||
<descriptor> should be unchecked <descriptor> should be unchecked in <descriptor> | Will verify a checkbox is unchecked. The element part of the first descriptor can be omitted and checkbox will be assumed. | ||||||||||||
ensure that <el statement> | Will verify that the el statement evaluates to a boolean True. | ||||||||||||
ensure that <first> equals <second> | Will verify that the outcome of first value (string, variable or el statement) equals the second. | ||||||||||||
ensure that <object> contains <property> ensure that <object> contains <property> with <value> ensure that <object> contains: | Checks that a certain object contains properties. This can be a variable that is previously declared, or the result of a REST call or anything else that translates into an object.
| ||||||||||||
<descriptor> should have attribute "<attributeName>" <descriptor> has attribute "<attributeName>" <descriptor> has the following attributes: | <attributeName> | <descriptor> should have the following attributes: | <attributeName> | | Will verify a DOM attribute is present. Make sure you use the Javascript/DOM name in case an attribute is not found but expected to be. | ||||||||||||
<descriptor> should not have attribute "<attributeName>" <descriptor> does not have attribute "<attributeName>" <descriptor> should not have the following attributes: | <attributeName> | <descriptor> does not have the following attributes: | <attributeName> | | Will verify a DOM attribute is not present. Make sure you use the Javascript/DOM name in case an attribute is not found but expected to be. | ||||||||||||
<descriptor> should have attribute "<attributeName>" with value "<value>" <descriptor> has attribute "<attributeName>" with value "<value>" <descriptor> has the following attributes: | <attributeName> | <value> | <descriptor> should have the following attributes: | <attributeName> | <value> | | Will verify a DOM attribute has a specific value. An empty value will simply perform an existence check for that attribute. Make sure you use the Javascript/DOM name in case an attribute is not found but expected to be. | ||||||||||||
<descriptor> should not have attribute "<attributeName>" with value "<value>" <descriptor> does not have attribute "<attributeName>" with value "<value>" <descriptor> does not have the following attributes: | <attributeName> | <value> | <descriptor> should not have the following attributes: | <attributeName> | <value> | | Will verify a DOM attribute does not have a specific value. An empty value will simply perform an existence check for that attribute. Make sure you use the Javascript/DOM name in case an attribute is not found but expected to be. | ||||||||||||
<descriptor> should have class "<className>" <descriptor> has class "<className>" | Will verify the specified class names (seperated with a space) are present on the element. The order of the class names does not matter and the element is allowed to have more classes than the ones specified.
| ||||||||||||
<descriptor> should not have class "<className>" <descriptor> does not have class "<className>" | Will verify that the element does not have all classes specified. If multiple classes are specified (separated with a space), then this step will only fail if the element has all of those classes. |
Checkbox, radio button and select
...