Option Configuration
In the Object Model Manager, open the configuration panel by selecting Actions → Options in the menu bar:

The configuration panel provides several options that let you customize the Model Manager’s behavior and enhance automation testing efficiency. The available options include:
Auto-Capture Control Screenshots
This option automatically captures control screenshots when they are added to the model.
- Enhances Model Readability: Each control is paired with a screenshot that visually represents its appearance and position, making the model easier to read and understand.
- Facilitates Identification: When browsing through the model, screenshots help you quickly confirm which control is being referenced, reducing the need for repeated searches or validation.
Tip: For standard controls, screenshots do not affect control recognition. For details, see Control Snapshots.
Highlight Controls When Selected
When enabled, selecting an object in the Model Manager’s object tree highlights the corresponding control in the application’s UI. See Highlight.
- Quickly Locate Controls: Helps you instantly find the control’s position within the application.
- Verify Object Accuracy: Ensures that the selected object in the model corresponds to the actual control, minimizing identification errors.
Delayed Execution Countdown
This setting specifies the countdown duration (in seconds) for delayed execution. The default value is 3 seconds.
- Use Cases:
- Detecting Popup Controls: Some actions—such as expanding menus or opening dialogs—require time to complete. The countdown allows sufficient time to perform these actions before detection.
- Preparing Complex Operations: Use the countdown to complete preparatory steps before executing complex operations, ensuring smoother control interactions.
Code Generation Mode
When generating automation scripts, you can choose between Short Path and Full Path modes. Each mode produces a different level of control reference depth depending on your testing needs.
Short Path Mode
This mode uses the target object’s name directly to locate the control, ignoring its parent hierarchy in the model tree.
- Example:
If your model contains a calculator button named “5”, the generated short-path code will look like this:JavaScriptawait model.getButton("五").click(); Advantages:
- Simplified Code: Produces shorter, easier-to-read scripts.
- Fast Access: Directly references the target control for faster execution.
Note: Ensure all object names are unique within the model library; otherwise, this mode may produce ambiguous references.
Full Path Mode
This mode generates code that traverses the complete hierarchy of parent objects step by step until it reaches the target control.
- Example:
For a button “5” located deep within a nested structure, the generated full-path code will look like this:JavaScriptawait model.getWindow("计算器").getWindow("计算器1").getCustom("Custom").getGeneric("LandmarkTarget").getGeneric("数字键盘").getButton("五").click(); Advantages:
- Clear Hierarchical Structure: Clearly represents the control’s nesting relationships, improving model comprehension.
- Higher Reliability: Ideal for complex applications, ensuring precise identification and avoiding confusion between similarly named controls.
Recommended Use:
Use Full Path Mode for complex hierarchies or when multiple controls share the same name to ensure accurate identification.