Skip to content

Get Element Count Activity

The Get Element Count activity counts how many UI elements match a given locator within a native Windows desktop application and stores the count in a variable for use in subsequent workflow steps.

Field Description Requirement
Application instance The reference name of the application instance previously opened or attached. Required
Element The JSON-based selector identifying the elements to count. Required
Result variable name The name of the variable where the element count will be stored. Required

Action Types & Examples

Element Count

  • Format: integer
  • Example Result: 3

Implementation Examples

Field Setup - Application instance: ${appInstance} - Element: the repeating control identified by the UI Automation Inspector - Result variable name: elementCountResult

Technical Notes

This activity is useful for validating how many rows, list items, or repeated controls are currently rendered before iterating over them with subsequent activities.