Troubleshoot object identification

This topic contains some additional methods and information about dealing with object identification.

Improve identification methods with Related Object

The XPath and JavaScript identification methods may return multiple elements depending on the expression used.

For example, if the XPath value is //button, and the Web page in question includes multiple button elements, multiple objects are returned.

To return a single object you can add a Related Object that narrows down the identification.

Back to top

Object Not Found error during interactive replay

If replay stops with an error that says the object was not found, try the following:

  • Select the failed step and press Highlight. If the correct object is not highlighted, use Improve Identification to improve object identification.

    Note: Improve Object Identification is available with the Automatic object identification method only.

  • If the Object Not Found error occurs and object is highlighted, see Object Not Found error when the object is highlighted.

Sometimes you may need to choose an Alternative Step that is provided in order to solve the issue. For example, you may be clicking on an option in a dropdown list in which the text changes based on some value. If you try to click based on the text, the step may fail. If you use an alternative step that selects the item in the list based on the ordinal value of this option within the list, the click will succeed regardless of the text.

Object Not Found error when the object is highlighted

If the replay fails even though the Highlight option finds the correct object, this may be a case of pacing.

The object takes a little longer to load and the step is executed faster. Therefore, during execution the step cannot locate the object although, during debugging, the Highlight option on the failed step finds the object.

In this case it is recommended to "slow down" the script so there is enough time for the object to load. Use one of the following options to do this:

  • Change the Object Timeout of the failing step in the Step section of the step's properties.

  • Add a Wait or Wait for Object step before the failed step.

Back to top

Replay fails to select an item from a list

One of the common reasons for this is that the names of the items in the list are dynamic.

For example, the list may include cities based on the text entered so far (auto-complete).

Based on the text types the list constantly changes.

There are two ways to solve this issue:

  • Use an alternative step that selects an item from the list using the ordinal identifier instead of the text of the actual item.

  • If the text is only partially dynamic you can use a regular expression to locate the required item based on partial text matching.

Back to top

Enable the object identification debug log

Enable the Object Identification Debug log to understand why TruClient was not able to identify an object using Automatic or Descriptors ID methods.

  1. In the script folder, create a .json file and name it additionalSettings.json. For example:


  2. Add the following configuration to the file:

    "TruClient": {
    "EnableIdentDescriptorsDebug": true,
    "EnableIdentDebug": true
  3. If TruClient is unable to identify an object, the log contains the following information:

    t=00006967ms: Error -205177: ** 3.1: Click on Search combobox ** failed - target object was not found.       
    Snapshot Info [MSH 1 0]    [MsgId: MERR-205177]  
     *Comment* Object not found
    t=00006970ms: Error -205177: Step ID: step:{b80a25a2-ec24-4186-8d1a-d72e6f525461}                                                   *Comment* Internal step information
    Test Object: testObj:{246c634d-e8bb-4c1e-9a33-899bff8c9a1b}
    Elected object: <input class="b_searchbox" id="sb_form_q" name="q" title="Enter your search term" value="" maxlength="1000" autocapitalize="off" autocorrect="off" autocomplete="off" spellcheck="false" type="search">  
     *Comment* Candidate object to elect
    Total votes received: -1  
     *Comment* Votes outcome
    Electors voted:  *Comment*  Electors vote.
    0. Elector: leaf, Value: true, Recorded Score: 0.01, Replay Voted Score: 0.01                                                                           
    1. Elector: position, Value: {"pos":"absolute"}, Recorded Score: 0.1, Replay Voted Score: -0.2
    2. Elector: role, Value: "combobox", Recorded Score: 0.05, Replay Voted Score: -1

    *Comments added to describe log sections.

Back to top

See also: