verifyAttribute

This is a pre-built Action located under the captured element. The functionality of this action in Avo Assure is to verify the attribute name provided in the input value. The result is stored in the given dynamic variable for further use during test execution.

Syntax

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

Argument
Description

<AttributeName> (Required)

Provide the attribute name you want to verify.

<AttributeValue> (Optional)

Provide the attribute value which you want to verify.

<css> (Optional)

Provide the css selector property which you want to verify.

Note:

  • The attribute name specifies a property or characteristic of an HTML element. For example, id and class are attribute names. These are predefined in HTML and help define the purpose or behavior of the element.

  • The attribute value is assigned to an attribute name and specifies the particular property or behavior for the element. It typically appears in quotes.

  • When verifying an attribute that is present inside the HTML tag, specifying the CSS is not required. However, to verify an attribute from the CSS file, the CSS must be provided in the input field.

Output Value: <Dynamic Variable>;<Dynamic Variable>(Optional)

Argument
Description

<Dynamic Variable>;<Dynamic Variable>(Optional)

Both dynamic variable stores the status as True or False.

Example 1: Verifying an Attribute of a Captured Element

In this example, we are explaining how to verify whether a specific attribute of a captured element matches the expected input value.

  • Action: verifyAttribute

  • Input Value: ID

    • The input (ID) specifies the expected value of the attribute to verify for the captured element.

  • Output Value: {Status}

    • The verification result is stored in the {Status} dynamic variable, with the following possible values:

      • True: If the elements attribute matches the expected input value.

      • False: If the elements attribute are does not matches the expected input value.

  • Logical Explanation: The verifyAttribute action reads the value from the Input Value column (ID). It identifies the captured element on the application interface and compares its defined attribute with the expected value. The result of this comparison (True) is stored in the {Status} variable.

Example 2: Verifying an Attribute of a Captured Element using a App Parameters

In this example, we are explaining how to verify whether a specific attribute of a captured element matches the expected input value.

  • Action: verifyAttribute

  • Input Value: ID;button-1 login-button;idsign

    • The first argument (ID) specifies the attribute name to verify for the captured element.

    • The second argument (button-1 login-button) specifies the expected attribute value to validate.

    • The third argument (idsign) specifies the CSS selector property to verify.

  • Output Value: {Status}

    • The verification result is stored in the {Status} dynamic variable, with the following possible values:

      • True: If the elements attribute matches the expected input value.

      • False: If the elements attribute does not match the expected input value.

  • Logical Explanation: The verifyAttribute action reads the values from the Input Value column (ID;button-1 login-button;idsign). It identifies the captured element on the application interface and compares the defined attribute with the expected value. The result of this comparison (True) is stored in the {Status} variable.

Last updated

Was this helpful?