Relevant for: GUI tests and components
Create the main body of your test or component by recording to allow UFT One to create test objects and add steps according to the operations you perform.
Note: If you are testing mobile applications, see Record Mobile tests.
While recording, UFT One:
Stores the test objects in the test or component's local object repository.
Adds the operations you perform as steps to the selected test action or component.
Enters the correct methods, and argument values for the objects in your application.
Add checkpoint and output value steps while recording to check or retrieve values from your application.
UFT One provides the following recording modes:
Note: UFT One supports an additional recording mode, Standard Windows recording, which is relevant when recording tests or components on SAP GUI for Windows applications.
For details, see the SAP GUI for Windows section of the Add-ins section of the UFT One Help Center.
Records the objects in your application and the operations performed on them.
This mode is the default and takes full advantage of the UFT One test object model, recognizing the objects in your application regardless of their location on the screen.
Records the exact mouse and keyboard operations that you perform, in relation to either the screen or the application window.
This mode is useful for recording operations that cannot be recorded at the level of an object, such as a digital signature produced by dragging the mouse.
The steps recorded are saved in a separate data file stored with the action.
A single RunAnalog statement is added to your action or component, which calls the recorded analog file.
You cannot edit analog recording steps from within UFT One.
Analog recording requires more disk space than normal recording mode.
For details on the available settings for analog recording, see Analog Recording.
Records on any object in your application, whether or not UFT One recognizes the specific object or the specific operation.
Use low-level recording:
- For recording on environments or objects not supported by UFT One, if the appearance of the objects might change, but their location will not. If the object’s appearance does not change, you can use Insight recording for unsupported environments or objects.
- If the location of the object is important to your test or scripted component. This way, the step will pass only if the object is in the correct position.
This mode records all parent level objects as Window test objects and all other objects as WinObject test objects. They are displayed in the Active Screen as standard Windows objects.
The following methods are supported:
Window test objects
WinObject test objects
Low-level recording mode is not fully supported for multibyte character input.
Steps recorded using low-level recording mode may not run correctly on all objects.
Low-level recording requires more disk space than normal recording mode.
Records on any object displayed on your screen, whether or not UFT One recognizes the object's technology and is able to retrieve its properties or activate its methods.
UFT One recognizes objects based on their appearance, and not their native properties. This can be useful to test controls from an environment that UFT One does not support or even from a remote computer running a non-Windows operating system.
For more details, see Identify objects using Insight.
Note: Insight recording requires more disk space than normal recording mode.
To control the amount of space used, adjust the number of snapshots saved and their size in the Insight pane of the Options Dialog Box.
Records the objects in your application as UI Automation objects.
For more details, see UI Automation in UFT One.
Close all unnecessary applications to avoid recording unnecessary user actions.
In the Record and Run Settings Dialog Box, decide how you want to open the application when you record and run your test.
For Web applications:
If you have Record and run tests on any open browser selected in the Record and Run Settings dialog box, ensure that the browser window was opened after you opened UFT One.
Determine the web site's security zone to help manage security alert dialog boxes in the browser window.
Select a predefined configuration level in the Web Event Recording Configuration dialog box (Record > Web Event Recording Configuration).
Do the following:
In the toolbar, click the Record button to start recording. In the BPT View, click the Record a New Business Component button.
UFT One is minimized, and a standalone Record Toolbar is displayed.
Perform user actions in your application.
UFT One records each step you perform and adds it to your test.
In addition, in the local object repository, UFT One adds a test object for each object on which you performed a step.
Note: If you are recording on a Web object, you must perform an action with the object in order for UFT One to record the step.
For example, if you want to select an item in a list that is already selected, you must first select another item, and then go back to select the original item.
For more details, see Record toolbar.
In the Record toolbar, select a mode from the Recording Modes dropdown.
Standard Windows recording (relevant when recording on SAP GUI for Windows applications)
When you want to return to normal recording mode, select the Default recording mode.
Tip: Recording in Insight mode may be slower than in other modes. Follow the recording progress by checking the number of recorded steps in the Record toolbar's title bar.
After recording in Insight mode
Delete extra Insight snapshots from the Object Repository (Tools > Delete Insight Snapshots).
Delete any unnecessary steps or make other adjustments. For example:
Recording Type steps
UFT One records the Type method on a Standard Windows test object, and not on the Insight test object.
After recording, you can delete this step, and replace it with a Type step performed on the relevant Insight test object.
Clicking before typing
If you click or press TAB to focus on a control before typing, UFT One records a step for the click or TAB press.
However, by default, the InsightObject's Type method clicks in the control before typing, and the preceding step is redundant. After recording, delete the redundant Click or Type step.
Use Text test objects to identify text in your application using OCR, regardless of the technology used to develop the application.
To record a step on a Text test object:
In the Record toolbar, click the down arrow near the Capture button, and select the Add Text Object option.
In the Select Learn Mode dialog box, select the mode you want for learning the object, and then select the text.
Note: If you previously selected Do not show me again on the Select Learn Mode dialog box, the learning session automatically begins using the mode you used most recently.Automatic learn mode
The pointer changes to a pointing hand. Click on the text in the application.
UFT One automatically detects the borders of the text, and takes a snapshot of it.Manual learn mode
The pointer changes to a crosshair, with an adjacent circle displaying a magnified image of the area around the center of the crosshair.
Take a snapshot of the text in the application, manually specifying the borders of the text.
Use this mode in cases where the automatic mode does not correctly detect the borders of the text, such as when the size of the area it selects in the application does not match the relevant text.
By holding the left CTRL, you can temporarily change the pointing hand or crosshair to a standard pointer.
This enables you to change the window focus or perform operations in UFT One or in your application.
In the Add Text Test Object dialog box, you can:
Adjust the borders of the image saved with the test object in the object repository.
Take a new snapshot to replace the image entirely.
Click Save to add the Text test object.
A new Text test object is added to the local object repository, under the test object that represents the application or window containing the text.
A Click step with this test object is added to your test or component.
In the local object repository:
The selected image is saved with the test object. UFT One uses OCR to extract the text from the image and save it in the test object's text property.
UFT One version 2022 and later: When using ABBYY OCR, UFT One uses additional color-related properties for text identification, including textcolor, backgroundcolor, huethreshold, and isinverted. These properties take effect only when Abbyy OCR is used.
The test object name is based on the extracted text, and the text property is used to identify the relevant text in the application.
If you later modify the test object image, UFT One updates the text property accordingly. However, if you manually modify the text property's value, the test object image is not updated. The new value of the text property is used for object identification.
UFT One version 2022 and later: When using ABBYY OCR (on an object added using ABBYY OCR), the test object's color-related properties are updated as well.