Use the UI Automation Add-in
Relevant for: GUI tests and components
This task describes how to properly use OpenText Functional Testing's UI Automation support, which helps you identify objects in your application when OpenText Functional Testing's normal object identification support is not sufficient for your needs.
Note: Before you use OpenText Functional Testing's UI Automation support, you must:
- Have an application that implements Microsoft UI Automation patterns. For details on support, see the UI Automation overview on MSDN.
- Load UI Automation in the Add-in Manager when starting OpenText Functional Testing.
OpenText Functional Testing's UI Automation support uses existing object identification functionality (such as Object Spy, Navigate and Learn, and the like). However, each of these object identification tools must be used in UI Automation mode.
Spy on objects in UI Automation mode
Do one of the following:
-
In the Object Spy, click the pointing hand drop-down arrow, select UI Automation, and click the button to spy on objects in UI Automation mode. For details, see Use the Object Spy.
-
In the Object Identification Center, click the UIA icon to spy on objects in UI Automation mode. For details, see Use the Object Identification Center.
Object properties are displayed as they would be recognized using UI Automation instead of their native technology.
Learn objects in UI Automation mode
-
Activate the UI Automation mode in OpenText Functional Testing before learning the objects.
- Select the Use UI Automation by default open in the Windows Applications > Advanced pane of the Options dialog (Tools > Options > GUI Testing tab > Windows Applications > Advanced node).
- In the Object Repository Manager window, select UI Automation from the Learn mode dropdown in the toolbar.
-
Add objects to your object repository using one of the following:
In the Object Spy Add Object to Repository button In the Object Repository Manager or Object Repository window Do one of the following:
-
Use the Add UI Automation Objects button .
The Add UI Automation Objects button is available only if you have selected UI Automation from the Learn mode dropdown in the toolbar.
- Add test objects using the Navigate and Learn toolbar
In the Keyword View -
In the Item cell, from the drop-down list, select Object from repository.
-
In the Select Test Object dialog, from the pointing hand button, click the drop-down arrow and select UI Automation.
-
Click the pointing hand button. UFT is minimized.
-
Select the object from your application. The object is added (with its parent objects if necessary) to the Select Test Object dialog box.
-
Click OK. The object is now added to the local object repository.
-
Record steps in UI Automation mode
-
In the toolbar, click the Record button .
-
In the Record Toolbar, from the Recording mode drop-down list, select UI Automation Recording.
All steps performed are now recorded as UI Automation objects, even if the object type can be recognized as another normal OpenText Functional Testing test object.
Note:
-
Recording may add additional unnecessary steps to your test. Remove the unneeded steps manually after finishing your recording session.
-
If you are recording to add a checkpoint or output value, ensure that the UI Automation Recording mode is selected before you click the Insert Checkpoint or Output Value button .
-
The speed of UI Automation recording can vary depending on the application.
For more details, see Record a GUI test or component.
Recognize Delphi objects using UI Automation
Use the UI Automation Add-in to recognize objects in your Delphi applications as follows:
-
When you start OpenText Functional Testing, enable both the Delphi and UI Automation Add-ins.
-
Spy, learn, or record on your Delphi control using UI Automation mode.
-
In the Object Repository, manually add the following properties to the new UI Automation object:
- delphi_name
- delphi_path
-
Manually remove the default name property.
See also:
-
For more details, see the UI Automation section of the OpenText Functional Testing Object Model Reference.