Record a GUI test or component

Relevant for: GUI tests only

If you are testing mobile applications, see the Mobile Center Help.

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

Start a recording session

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.

Record steps into the test

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.

Use the Record toolbar to manage your recording session

<Action Name> drop down list Select an action to include the recorded steps.

Insert Call to New Action

Select the type of new action you want to call.

Insert Checkpoint and Output Value

Select the type of checkpoint or output value to insert.

Capture objects to an object repository

While recording, you can learn objects without having to perform actions on them.

In the Record Toolbar, click the Capture button , and in the Capture Toolbar, select the area for which you want to learn objects.

Highlight the area in your application that you want to learn.

UFT adds the test objects to the local repository.

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.