Problems with object recognition

If you encounter a problem with object recognition during testing, you might be able to resolve the problem by following these instructions.

These issues might occur during object recognition:

Objects and controls are not recognized

Problem

Some controls in an application are not recorded in the same way that other objects from the same domain are recorded. This is due to one of the following reasons:
  • The controls are custom controls that HCL DevOps Test UI (Test UI) does not officially support. Therefore, the controls are recorded in a generic domain, as shown in this example::
    afxWnd90uwindow().click(atPoint(252,212));

Resolution

To resolve this problem, complete these steps:
  1. Create a custom proxy for those controls or submit an enhancement request to get your application supported by Test UI.

The click action on UI controls do not work

Problem

When you run a functional test by using the Web UI engine, the test steps that contained the 'click' action might fail as the UI control is not correctly recognized. This problem might occur because of the changes in the settings of the async flag in the ivory.properties file.

Resolution

You must set the async flag to false to resolve the issue:
  1. Open the ivory.properties file located at <Install_Directory>\HCL\DevOpsTest\FunctionalTester\bin.
  2. Set functional.tester.html.playback.async=false.
  3. Restart Test UI.

The playback of a context menu fails in Linux operating systems

Problem

When you record a functional test in Windows and play it back in Linux, the test steps that contained the contextMenu.click() action might fail with an object not found error as the UI control is not correctly recognized.

Resolution

As a workaround, you must edit the test and use the following alternatives to the contextMenu.click()action in your test script:
  • Different key combinations to navigate and select the context menu options in the application under test (AUT). For exmaple, you can use alt+enter or alt+shift+S as a key combination to replace the contextMenu.click() action in the test script.
  • Alternate menu items to complete the action in the application under test (AUT).

Previously recorded scripts do not work

Problem

The test object map lists the test objects in the application under test, in a hierarchy. If the application under test changes, the object hierarchy might change. During playback, Test UI cannot find an object whose hierarchical position changed, and as a result, playback fails.

Resolution

  1. Use the dynamic find feature. When a search that is based on object recognition scoring (ScriptAssure) fails to find objects whose hierarchy has changed, the dynamic find feature searches for such objects. To convert an object to a dynamic object:
    1. From the test object map menu, right-click the test object map, and click Convert To Dynamic Test Object ().
    2. In the Convert To Dynamic Test Object window, select Select the parent to anchor in the object hierarchy. The new object becomes a descendant of its parent.
    3. Select the object to convert, and click Finish.
  2. Search for the object by using the find method instead of the Record-Playback method. When you use find(), Test UI searches for a matching object in the entire hierarchy. Therefore, a change in the hierarchy does not cause the playback failure.