Chained Objects
Within the same model library, you can manage various types of objects — such as Windows objects, Java objects, cross-platform Qt objects, ATK objects, pattern objects, and virtual controls. Typically, all nodes within a control tree are of the same type. However, it is also possible to add different types of objects under a single tree node — this structure is referred to as chained objects.
A chained relationship establishes a hierarchical structure within the control tree, enabling more precise control location and operation.
A chained object means that one object acts as the child node of another. When locating a specific control, the system first identifies the parent object, and then searches for the child control within the area defined by that parent.
Common Types of Chaining and Use Cases
Chaining Objects of the Same Technology Type
This is the most common scenario, such as chaining multiple Windows objects or multiple Qt objects. These objects are typically detected and generated directly from the application by the control spy. All nodes belong to the same technology type, resulting in a clear and straightforward hierarchy.Parent Object Based on Object Recognition, Child as a Pattern Object
In this case, the parent control is located using object recognition technology, and then pattern recognition is used within the parent’s visible area to locate the child control. Since the parent’s position has already been determined, this significantly narrows the matching scope, improving both the speed and accuracy of pattern matching.Parent Object Based on Object Recognition, Child as a Virtual Control
Here, once the parent control is identified, the child is a virtual control. A virtual control allows operations on a specific region within the parent control rather than the entire control. This approach is suitable for precise manipulation of localized areas.Multi-Level Chaining with Object Recognition + Pattern Control + Virtual Control
The parent node uses object recognition to locate the base control, the child node uses a pattern control to further refine the search area, and the grandchild node (virtual control) targets the specific region for operations. This multi-layer chaining provides exceptional precision, ideal for complex UI automation scenarios.Combination Chaining of Object Recognition + Virtual Control + Pattern Control
In this structure, the parent node is located using object recognition, the child node (virtual control) defines a more constrained sub-area, and the grandchild node (pattern control) performs image-based matching within that region. This approach enhances performance and robustness in complex environments.Pattern Control Chained with Another Pattern Control
Pattern-to-pattern chaining means that a broader pattern is first located, and then smaller pattern controls are identified within that region. This method is commonly used for matching visual elements within nested graphical interfaces.
Notes and Performance Considerations
Generally, the deeper the chaining hierarchy, the more search operations are required, which can increase processing time.
However, in certain cases—such as combining object recognition with pattern-based controls—the search area can be effectively reduced, minimizing search time and improving overall efficiency.