Get Object Attribute Value

This is a pre-built Action located under the captured Element. The functionality of this Action in Avo Assure is to fetch the specified attribute value from the captured object. The result is stored in the given dynamic variable for further use during test execution.

Syntax

Input Value: <AttributeName>;<css>(Optional)

Argument
Description

<AttributeName> (Required)

Provide the attribute name of the object which you want retrieved.

<css> (Optional)

Provide the css selector property of the object you want to retrieved.

Note:

  • The attribute name applies to various HTML elements, including form controls such as input, select, text area, and button.

  • When verifying an attribute that exists inside an HTML tag, mentioning CSS in the input field is not required. However, when verifying an attribute defined in a CSS file, CSS must be specified in the input field.

Output Value: <AttributeValue>;<Status>

Argument
Description

<AttributeValue> (Required)

This variable stores the retrieved attribute value from the object.

<Status> (Required)

This dynamic variable stores the status as True or False.

Note:

  • The AttributeValue represents the value assigned to an <input> element. Its purpose varies based on the input type:

    • For button, reset, and submit, it defines the text displayed on the button.

    • For text, password, and hidden, it defines the initial (default) value of the input field.

  • Status: The Status indicates whether the attribute value is fetched successfully and stores the result as True or False.

Example: Fetching the Attribute Value of a Captured UI Element

In this example, we are explaining how to retrieve the value of a specific attribute from a captured element within the application.

  • Action: Get Object Attribute Value

  • Input Value: ID

    • The first argument (ID) specifies the attribute name whose value needs to be fetched from the captured UI element.

  • Output Value: {Value}

    • The fetched attribute value (button-1 login-button) is stored in the {Value} dynamic variable.

    • If a second output variable is defined, it stores the action status with the following possible values:

      • True: If the attribute value is successfully retrieved.

      • False: If the attribute value is not retrieved.

  • Logical Explanation: The Get Object Attribute Value action reads the attribute name from the Input Value column (ID). The action identifies the captured UI element within the application and retrieves the value of the specified attribute. The attribute value (button-1 login-button) is stored in the {Value} variable.

Last updated

Was this helpful?