Lesson 9: Change the Recognition Preferences

In the previous lesson, you saw how you can update the recognition properties of an object when they change. Another factor you can change is the recognition weights that HCL OneTest UI uses during playback. You use the ScriptAssure recognition preferences to set this. The label object that you tested with the second verification point can demonstrate how this works.

Procedure

  1. On the HCL OneTest UI menu, click Window > Preferences.
  2. Click Functional Test > Playback > ScriptAssure.
  3. Click the Advanced button.

    Notice that one of the default settings is Warn if accepted score is greater than: 10000. A score of 10000 indicates that one important property can be wrong. Let's lower the score to 5000 and see what happens.

  4. Select the Use Default check box beside this field.
  5. Then type 4000 in the field and then click OK.
  6. Play back the script on ClassicsB again.

    The log now contains a warning for the label object. The reason given in the objectFound field, is that the recognition score is 10000. This discrepancy was caused by changing the word "Order" to "Orders" in the label.

  7. Close the log.
  8. Restore the default value for the recognition score:
    1. Click Window > Preferences.
    2. Click Functional Test > Playback > ScriptAssure.
    3. Click the Advanced button.
    4. Select the Use Default check box beside the Warn if accepted score . . . field.

      This will change the 4000 back to 10000.

    5. Click OK
    6. Play back the script again.

      Now the warning is gone and everything passes.

    7. Close the log.

Results

This lesson showed how you can tweak the recognition score in order to achieve the sensitivity that you want for object recognition. For more information about using ScriptAssure, see the HCL OneTest UI Help.