Relevant for: GUI tests and components
The UFT automation object model is a set of test objects, methods, and properties that represent elements in the UFT user interface, enabling you to control UFT from other applications.
Use the automation object model to write Visual Basic scripts that control UFT to modify configuration and run settings. This is helpful when you need to define the same settings multiple times, or on multiple tests and components, or quickly configure UFT for a specific environment or application.
Most UFT UI elements and options are supported in the automation object model as follows:
|Dialog boxes||Most UFT dialog boxes have a corresponding automation object.|
|Options in dialog boxes||Most options in UFT dialog boxes have a corresponding object property.|
|Menu commands and other operations||Most UFT menu commands and other operations have corresponding automation methods.|
Design your automation script using the objects, methods, and properties exposed by the UFT automation object model, along with standard programming elements such as loops and conditional statements.
The following are two common scenarios of where you might use UFT automation scripts.
Configure your team's testing configuration
Use the automation object model to create a script that opens UFT with specific configuration settings.
Instruct all your tests to open UFT using this automation script to ensure that all your entire team works with the same configuration.
Run tests and components
Create a script that performs the following steps to define specific settings and run a UFT test or component.
Load a required add-in.
UFT 15.0.1 and later: You can skip this step if the script will only open existing tests or business components and run them. When opening a test or business component, UFT dynamically loads its associated add-ins. For details, see Loading add-ins that were not loaded at startup.
Open a test or component.
Configure settings in the:
Options dialog box
Test Settings or Business Component Settings dialog boxes
Record and Run Settings dialog box
Save and run the test or component.
Add a loop to your script to enable you to use the same script on multiple tests and components.