Recording a Test with AI or OCR

Use the Interactive Recording window to record a test with AI or OCR against a mobile or web application.

Before you can record a UFT Developer test, you must have created a UFT Developer project.

To record a new test with AI:

  1. Select the project to which you want to add the new test.
  2. In the toolbar, click Record Actions.
  3. The Interactive Recording window opens and displays the application under test (AUT).
    1. Switch to AI mode.
    2. The AI engine is started up. A screenshot is taken for processing. A banner with the text Retrieving Object Hierarchy is displayed on top of the AUT. Depending on the hardware, this might last 3 to 6 seconds. Avoid to interact with the AUT while a banner is active.
  4. Highlighting and distinguishing AI objects and OCR objects.
    1. Detected AI objects will be highlighted with pink rectangles. If you hover over an AI object, a description of the detected control class is displayed at the bottom of the Interactive Recording window.
    2. OCR objects are hidden by default. If you hover a short while over a text, any OCR object detected for that text will be highlighted. If you hover over an OCR object, the control class description AITextBlock followed by the start of the OCR text is displayed at the bottom of the Interactive Recording window.
    3. Optional: If the application under test has changed after the rectangles have been drawn on top of it, you may want to refresh the rectangles by clicking the refresh button in the Interactive Recording window.
  5. Perform the actions you want to record.
    1. Click on the highlighted object with which you want to interact. UFT Developer performs the default action for the object. If there is no default action, or if you have to insert text or specify parameters, the Choose Action dialog box opens.
    2. Optional: To chose an action for an object, which might not be the default action, right-click on the object. The Choose Action dialog box opens with a list of available actions. Top of the list represents the actions available on the AI Object. If an underlying native object is also detected, bottom of the list represents the actions on the native object.
    3. Optional: If the action has parameters, type the parameters into the parameter fields. UFT Developer automatically validates the parameters.
    4. Optional: To record a checkpoint, press <Ctrl>-<Alt> or right-click on the object and select Add Verification. This opens the Verification dialog where the properties of the object or an image-based verification can be created.
    5. Click OK to close the Choose Action dialog box. UFT Developer adds the action to the recorded actions and replays it on the application under test.
  6. Continue the recording workflow by
    1. clicking Play to test the playback of the recorded actions directly from the Interactive Recording window.
    2. clicking Stop to open up the Record Complete dialog box and continue to save the recorded script.
    For additional information about the actions available during recording, see Actions Available During Recording.

Replay the test to ensure that it works as expected. You can modify the test to make changes if necessary.