Testim Documentation

Welcome to the Testim documentation. You'll find comprehensive guides to help you get started quickly, example code snippets, and tips for being more productive. You will also find details about advanced features that allow you to customize Testim to fit your environment or special testing conditions. Don't worry, we'll support you if you get stuck. Let's jump right in!

Guides    Changelog

Validate CSS property

Validate any CSS property of an element

The CSS property validation allows you to validate any CSS property of an element (e.g. color, background-color, font-family, etc.).

Adding a Validate CSS property step

To add a Validate CSS property step:

  1. Hover over the (arrow symbol) where you want to add the validation.

The action options are displayed.

  1. Click on the Toggle Breakpoint button.
  1. Click on the Play Scenario button to run the test until the breakpoint.
  1. Hover over the (arrow symbol) again and click on the “M” (Testim predefined steps).
    The Predefined steps menu opens.
  1. Click on Validations.
    The Validations menu expands.
  1. Scroll down through the menu and select Validate CSS property.

📘

Alternatively, you can use the search box at the top of the menu to search for Validate CSS property.

  1. In the AUT window, identify the relevant element for which you wish to validate a CSS property, and click on it to select it.
    The CSS Property Validation form is shown.
  1. In the Property name field, enter a valid CSS property for the element.
  2. In the Expected value field, enter the value you wish to validate for the property.
  3. Click OK.
    The step is created, and a thumbnail of the selected element is shown in the step.
  1. Click on the Toggle Breakpoint button after the validation step to remove the breakpoint.

Modifying a Validate CSS property step

If you want to change the element you selected, you don’t need to delete and re-record the step. Instead, you can reassign the element with a different element. Additionally, you can modify the property name and/or expected value of the original element you selected without selecting a new element.
To reassign the selected element in a Validation step:

  1. Hover over the position to the left of the step for which you want to reassign the element and click on the Toggle Breakpoint button.
  2. Click on the Play Scenario button to run the test until the breakpoint.
  3. Hover over the step for which you want to reassign the element and click on the Show Properties () icon.

The Properties panel opens on the right-hand side.

  1. Hover over the Target element thumbnail to show options, and click Reassign.
  1. In the AUT window, identify the new element that you would like to select and click on it.
    The selected element is shown in the Target element box in the Properties panel.
  2. In the Properties panel Property name field enter the property name for the new element.
  3. In the Properties panel Expected value field enter the expected value of the new property.

📘

When modifying the value of the Property name and Expected value in the Properties panel, make sure they are enclosed in single quotes: e.g. ‘background’ and ‘#ffea64’.

  1. Click on the same Toggle Breakpoint button to the left of the step for which you reassigned the element to remove the breakpoint.
  2. If you want to modify the property name and/or expected value of the original element you selected (without choosing a new element), follow Steps 3, 6, and 7 above.

Updated 2 months ago

Validate CSS property


Validate any CSS property of an element

Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.