Get index count
This is a pre-built Action located under the @Generic Element. The functionality of this Action in Avo Assure is to retrieve the total number of items (index count) present in a list within the AUT. The execution result is stored in the dynamic variable.
Syntax
Input Value: <variable containing list value>
<variable containing list value> (Required)
Provide a list which total number of items will be counted.
Output Value: <Dynamic Variable>;<Dynamic Variable>(Optional)
<Dynamic Variable> (Required)
This dynamic variable stores the number of items present in the list.
<Dynamic Variable>
(Optional)
This dynamic variable stores the status as True or False.
Example: Retrieving the Total Number of Items in a List
In this example, we explain how to retrieve the total number of items present in a list.
Action: Get Index Count
Input Value: {Values}
The argument ({Values}) specifies the dynamic variable that contains the list whose total number of items needs to be calculated.
The stores array list in this {Values} variable is: ['HTML, 'Python', 'Java']
Output Value: {Count}
The fetched number of items (3) present in the list is stored in this {Count} dynamic variable.
If a second output variable is provided, then action returns the status as True or False:
True: if the index count is retrieved successfully.
False: if the action fails due to an invalid or empty list.
Logical Explanation: The Get Index Count action takes the list variable provided in the Input Value column ({Values}) and calculates how many items exist in that list. It stores the total number of items (3) in the {Count} variable.

Last updated
Was this helpful?