Record a GUI test or component

Relevant for: GUI tests only

Create the main body of your test or component by recording to allow UFT to create test objects and add steps according to the operations you perform.

Note: If you are testing mobile applications, see Record Mobile tests.

Recording overview

While recording, UFT:

  • 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.

Back to top

Recording modes

UFT provides the following recording modes:

Note: UFT 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 Unified Functional Testing Add-ins Guide.

Normal Recording

Records the objects in your application and the operations performed on them.

This mode is the default and takes full advantage of the UFT test object model, recognizing the objects in your application regardless of their location on the screen.

Analog Recording

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.

  • Analog recording requires more disk space than normal recording mode.

For details on the available settings for analog recording, see Analog Recording.

Low-level recording

Records on any object in your application, whether or not UFT recognizes the specific object or the specific operation.

Use low-level recording:

  • For recording on environments or objects not supported by UFT, if the appearance of the objects might change, but their location will not. If the object’s appearance will 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

  • Activate

  • Click

  • DblClick

  • Drag

  • Drop

  • Maximize

  • Minimize

  • Restore

  • Type

WinObject test objects

  • Click

  • DblClick

  • Drag

  • Drop

  • Type


  • 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.

Insight recording

Records on any object displayed on your screen, whether or not UFT recognizes the object's technology and is able to retrieve its properties or activate its methods.

UFT recognizes objects based on their appearance, and not their native properties. This can be useful to test controls from an environment that UFT does not support or even from a remote computer running a non-Windows operating system.

For more details, see Identifying 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.

UI Automation recording

Records the objects in your application as UI Automation objects.

For more details, see UI Automation in UFT.

Back to top

Recording prerequisites

  • 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.

  • 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).

Back to top

Start a recording session

Do the following:

  1. In the toolbar, click the Record button to start recording. In the BPT View, click the Record a New Business Component button.

    UFT is minimized, and a standalone Record Toolbar is displayed.

  2. Perform user actions in your application.

    UFT records each step you perform and adds it to your test.

    In addition, in the local object repository, UFT 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 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.

Back to top

Switch to other recording modes

In the record toolbar, select a mode from the Recording Modes dropdown.

  • Analog recording

  • Low-level recording

  • Insight recording

  • 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 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 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.

Back to top

See also: