Property action

What is the Property Action?

The Property action is used to retrieve the value of an attribute or property from a captured graphical element and store it in a variable. Unlike a validation (assertion), this action does not stop the test if the value is unexpected; its sole purpose is to "read" the information.

How it Works

In your script, select the property action in the actions menu.

When adding a "Property" action to a captured element, you must configure three main components:

  • Interface Element: The UI component you captured (e.g., a button, input field, or image).
  • Property Name: The specific attribute you want to read.
    • Web: id, class, href, src, value, placeholder, etc.
    • Calculated Properties: Agilitest also allows you to retrieve properties like text (visible text) or checked (for checkboxes).
  • Destination Variable: The name of the variable (prefixed with $) where the value will be stored.

Common Use Cases

Retrieving Dynamic IDs: Reading an order number generated by the application to use it in a subsequent step.

Design/CSS Verification: Retrieving the class property to check if an element is marked as "active" or "hidden."

URL Extraction: Reading the href attribute of a link to ensure it points to the correct domain.

Calculations and Transformations: Retrieving a price (as text), storing it, and then using a script action to convert it into a number for calculations.

On this page

// TOC MANAGEMENT