Checks
A check is a step that passes or fails. It is how a plan tells you that your site works: “the confirmation message is shown”, “the cart says 2 items”, “the address ends with /thanks”.
To add one, choose Add a step, then one of the three families under Check:
- Check an element: something on the page.
- Check the page: its address, its title, its last dialog, how it looks.
- Check a field: what a field holds.
Then pick the exact check in What is checked. You can change it later, and the element stays.
Check an element
Section titled “Check an element”First say which element, as for any step (see Find the right element). Then, in What is checked:
| What is checked | Passes when |
|---|---|
| is shown | The element is visible on the page. The most common check. |
| is not shown | The element is absent or hidden: an error message gone, a window closed. |
| is in the page, even hidden | The element exists in the page, visible or not. |
| contains a text | The element’s text contains the Text expected. |
| how many there are | Exactly How many elements match (0 or more). For example, 3 rows in the cart. |
| is enabled | A button or field can be used. |
| is disabled | A button or field is greyed out and cannot be used. |
| is ticked | A checkbox or radio button is ticked. |
| can be edited | You can type in the field (it is not read-only or disabled). |
| is empty | A field holds nothing, or an element has no text. |
| has the focus | The element has the cursor, for example the field you are typing in. |
| is on screen without scrolling | The element is visible on the screen as it is, without scrolling. |
| has an attribute | One of the element’s hidden properties has a given value (see below). |
| looks the same | The element looks the same as a saved picture. See Look checks. |
The opposite
Section titled “The opposite”Most element checks have a box The opposite (checks that it is not so). Tick it to check the reverse: “is not enabled”, “is not ticked”, “does not contain the text”, “the number is not 3”.
is shown and is not shown are each other’s opposite already, so they have no box. looks the same has none either.
Exact text
Section titled “Exact text”With contains a text, the text only needs to be part of the element’s text: 2 items passes for “Your cart: 2 items”. Tick Exactly this text when the whole text must be that text.
Counts
Section titled “Counts”how many there are counts every element that matches the description, for example every “Remove” button, or every list item inside the “Cart” region. Use it to check that adding a product adds a row, or that a search finds nothing (0).
Attributes
Section titled “Attributes”Some things are not visible as text, but the page holds them: where a link goes, an image’s description. has an attribute checks them:
- Attribute: its name, for example
hreffor a link’s address, oraltfor an image’s description. - Its value: the value expected.
Ask a developer if you are not sure of the attribute’s name.
Check the page
Section titled “Check the page”| What is checked | Passes when |
|---|---|
| its address | The Page address contains the text you give, for example /thanks after an order. Tick Exactly this address for an exact match. |
| its title | The Page title (the name in the browser tab) contains the text. Tick Exactly this title for an exact match. |
| its last dialog | The last browser dialog (“Are you sure?”, “Saved!”) had a message that contains Its message contains. |
| looks the same | The page looks the same as a saved picture. See Look checks. |
Dialog messages
Section titled “Dialog messages”Browser dialogs are the small grey windows the browser itself shows, with an OK button and sometimes Cancel. To check one:
- Before the click that shows it, add Answer the next dialog and choose Accept (OK) or Dismiss (Cancel). Without it, the dialog is dismissed.
- Add the click.
- Add Check the page, with its last dialog, and type part of the expected message.
The step reads: Verify that the last dialog’s message contains “Are you sure”.
Check a field
Section titled “Check a field”its value passes if a field holds exactly the Expected value: for example a postcode filled in for you, or the quantity in the cart.
- For a list that allows several choices, tick Several values (a list that allows several) and give each value (Add one adds another).
- The expected value can be a secret: tick Use a secret (see Write steps).