Object Attributes
In the Model Manager, each node represents a model object used to match and interact with controls in an automated application. Each object matched to its target control through identifying attributes and interacts with it via APIs. Understanding these identifying attributes helps you choose the best matching strategy in different scenarios, ensuring accurate recognition and stable operations.
Each control object contains several key elements: a descriptive name, its location in the application tree, identifying and other attributes, and optionally an image.

What Are Identifying Attributes?
Identifying attributes are critical for locating the target control. When performing operations on a control, the system first uses these attributes to locate it, then executes the intended actions. Improperly set identifying attributes can cause:
- Unable to locate the control: Error
1001: Object not found. - Multiple controls matched: If multiple controls match, the system returns an array and performs operations on the first control by default, which may cause incorrect actions.
To avoid these issues, you should add or optimize identifying attributes to improve matching accuracy.
Adding and Removing Identifying Attributes
- Add Identifying Attribute
: Enhance matching accuracy by adding extra identifying attributes.
To set an attribute from Other Attributes as an identifying attribute, right-click the attribute and select “Set as Identifying Attribute”. - Remove Identifying Attribute
: Remove the attribute from the identifying set, so it will no longer be used for matching.
Updating Control Identifying Attributes
If a control's properties have changed in the application, use “Update Attributes from Application” to synchronize the latest values without modifying scripts manually. Click , enter spy mode, and select the control to update the identifying attributes of the current object.
Editing Identifying Attributes
You can directly edit or modify the values of identifying attributes by clicking the corresponding text field.
Changing Matching Patterns
Some control properties (e.g., name or text) may change dynamically. To improve recognition flexibility, you can adjust the matching pattern. Common patterns include:
i Contains: The attribute value contains the specified text.s Starts: The attribute value starts with the specified text.e Ends: The attribute value ends with the specified text.~ Regex: Use a regular expression to match the attribute value.Text: Match the full text exactly.

Best Practices for Identifying Attributes
Recommended default attributes: When saving a control object, CukeTest typically selects attributes that uniquely identify the object, such as
type,name,automationId. You may also add extra attributes or remove unnecessary ones to match changes in the test application.Dynamic attributes: Avoid using dynamically generated attributes, such as display text or labels, as identifiers. For example, when identifying a calculator's result, do not use the
nameattribute because it changes with each calculation. Instead, remove dynamic attributes manually or adjust the matching pattern to ensure correct recognition.
For complex or dynamically changing applications, consider using Spying Rules to further optimize control identification.

Distinguishing Identifying Attributes and Other Attributes
In Model Manager, object properties are divided into Identifying Attributes and Other Attributes. Identifying attributes uniquely identify controls in the application, while other attributes are recorded for reference only and do not participate in matching. You can promote other attributes to identifying attributes using “Set as Identifying Attribute” to improve matching accuracy.
Identifying Attributes vs Runtime Attributes
- Identifying Attributes: Used for matching controls. They are fixed, stored in the model file or described in code. Auxiliary attributes like
indexorsearchHintcan be used to enhance recognition. - Runtime Attributes: Dynamically retrieved during automation, such as visibility or position. These are typically used to verify or interact with the control's current state. While most identifying attributes are also available at runtime, runtime attributes focus on the control's live state.
Identifying Attributes by Automation Technology
Different types of control objects have different identifying attributes. Refer to the respective documentation for details: