For the complete documentation index, see llms.txt. This page is also available as Markdown.

Get Object Attribute Value

This pre-built action is located under the @Custom element type. The functionality of this action in Avo Assure is to retrieve the attribute value of the object based on the input provided and stores the result in a dynamic variable.

Syntax

Input Value: <ObjectType>;<VisibleText(optional)>;<Index>;<AttributeName>;<css>(optional)

Note:

  • Ensure that the specified element exists and is accessible before executing the Action.

  • The element must be visible and loaded completely for successful execution.

  • If css is specified, the Action retrieves the value of the given CSS property instead of a standard HTML/DOM attribute.

Argument
Description

<ObjectType> (Required)

Specify the type of custom element from which the attribute value is to be retrieved.

<VisibleText> (Optional)

Specify the visible text of the element, used to identify the target element when multiple elements of the same type exist.

<Index> (Required)

Specify the index of the element to identify the target element when multiple matching elements exist.

<AttributeName> (Required)

Specify the name of the attribute whose value is to be retrieved.

<css> (Optional)

Specify this flag if the <AttributeName> refers to a CSS property rather than a standard element attribute.

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

Argument
Description

<Dynamic Variable> (Optional)

Stores the retrieved attribute value.

<Dynamic Variable> (Optional)

Stores the status as True or False.

Example: Getting an Object's Attribute Value

  • Action: Get Object Attribute Value

  • Input Value: button;Login;0;class

    • The first argument button specifies the object type of the custom element.

    • The second argument Login specifies the visible text on the element.

    • The third argument 0 specifies the index of the element.

    • The fourth argument class specifies the name of the attribute to retrieve.

  • Output Value: {Attribute Value};{Status}

    • The result of the Get Object Attribute Value action is stored in the {Attribute Value} and {Status} dynamic variables, with the following possible values:

      • {Attribute Value} stores the actual value of the specified attribute.

      • True: The attribute value is successfully retrieved from the specified element.

      • False: The Action fails due to an invalid object type, unmatched visible text, incorrect index, non-existent attribute, or the element being inaccessible.

  • Logical Explanation: The Get Object Attribute Value action reads the object type, visible text (if provided), index, attribute name, and css flag (if provided) from the Input Value field. During execution, Avo Assure identifies the specified custom element and retrieves the value of the specified attribute (either a standard attribute or a CSS property, based on the css flag). The Action then returns the retrieved value and execution status in the specified dynamic variables.

Knowledge Bites

Scenario
Input Value
Result

Get a standard HTML attribute

TextBox;;1;value

Retrieves the value of the value attribute from the first matching TextBox element.

Get attribute using visible text to narrow selection

Link;Home;1;href

Retrieves the value of the href attribute from the Link element with visible text "Home".

Get a CSS property value

Div;;1;color;css

Retrieves the value of the color CSS property from the Div element.

Last updated