Record a GUI test or component

Relevant for: GUI tests and components

Create the main body of your test or component by recording to allow OpenText Functional Testing 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, OpenText Functional Testing:

  • 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

OpenText Functional Testing provides the following recording modes:

Note: OpenText Functional Testing 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 OpenText Functional Testing Help Center.

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 OpenText Functional Testing 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.

Note:  

  • You cannot edit analog recording steps from within OpenText Functional Testing.

  • 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 OpenText Functional Testing recognizes the specific object or the specific operation.

Use low-level recording:

  • For recording on environments or objects not supported by OpenText Functional Testing, 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

  • Activate

  • Click

  • DblClick

  • Drag

  • Drop

  • Maximize

  • Minimize

  • Restore

  • Type

WinObject test objects

  • Click

  • DblClick

  • Drag

  • Drop

  • Type

Note:  

  • 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 OpenText Functional Testing recognizes the object's technology and is able to retrieve its properties or activate its methods.

OpenText Functional Testing recognizes objects based on their appearance, and not their native properties. This can be useful to test controls from an environment that OpenText Functional Testing 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.

UI Automation recording

Records the objects in your application as UI Automation objects.

For more details, see UI Automation.

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 OpenText Functional Testing.

  • 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

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

    OpenText Functional Testing is minimized, and a standalone Record Toolbar is displayed.

  2. Perform user actions in your application.

    OpenText Functional Testing records each step you perform and adds it to your test.

    In addition, in the local object repository, OpenText Functional Testing 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 OpenText Functional Testing 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

    OpenText Functional Testing 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, OpenText Functional Testing 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

Record a Text object 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:

  1. In the Record toolbar, click the down arrow near the Capture button, and select the Add Text Object option.

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

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

  4. 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. OpenText Functional Testing uses OCR to extract the text from the image and save it in the test object's text property.

    When using ABBYY OCR, OpenText Functional Testing 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, OpenText Functional Testing 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.

    When using ABBYY OCR (on an object added using ABBYY OCR), the test object's color-related properties are updated as well.

Back to top

See also: