Editing Target Element Properties

The target element is the element that was selected in the AUT (application under test) browser as the main element for this step. The target element is editable. The element itself appears as a thumbnail image in the Properties panel.
The following options are shown when hovering over the thumbnail: Highlight, Reassign, Improve, and View locators.

  • Highlight – Clicking on Highlight opens the AUT browser with the target element momentarily highlighted in pink. This can be helpful because it allows you to visually confirm in the AUT browser what the target element is.
  • Reassign – This option allows you to replace your target element with a different target element from your AUT. See Reassigning/Improving the Target Element.
  • Improve – If an element has changed substantially but is still within the acceptable tolerance for recognition, you may want to "Improve" the locator. In contrast to "Reassign", "Improve" does not reset the machine learning algorithm, but instead gives it a manual "nudge" in the right direction.
  • View locators – When an element is selected during a recording (click, hover, enter, etc.), Testim's algorithm analyzes potentially hundreds of attributes associated with the element. It then assigns weights to the attributes to uniquely identify the element. These attributes are known as Locators. Testim’s Smart Locators learn with each test run. If some attributes change, the Smart Locator will use other attributes to identify the element. This way, if the element is changed but is still functioning, Testim's Smart Locators will find it and keep the test from failing.
    This option allows you to see how a Smart Locator is identifying an element. To learn more about viewing Locators, see Viewing Smart Locators.

Highlight Target Element

Before making changes to a target element, you can highlight the element in the AUT browser to visually confirm which element is the current target element.

To highlight the target element:

  1. Hover over the step for which you want to highlight the target element and click the Show Properties button.
351351

The Properties panel opens on the right-hand side.

326326
  1. Hover over the target element thumbnail and click the "Highlight** link.
323323

Testim will highlight the target element in the AUT browser window.

810810

Reassigning/Improving the Target Element

If an element has changed substantially, you may want to reassign the locator to the new/appropriate element. Testim uses machine learning to better identify how elements behave and adjust scores automatically. The "Reassign" action will restart the machine learning based on the newly discovered attributes.

Alternatively, you can “Improve” the element without resetting the machine learning algorithm.

To reassign the target element in a “click” step:

  1. Hover over the step you want to reassign and click the Show Properties button.
351351

The Properties panel opens on the right-hand side.

326326
  1. Hover over the Target element thumbnail and click the Reassign link.

📘

Alternatively, if you would like to improve the element without resetting the machine learning algorithm, click the Improve link instead.

322322
  1. If you don't already have the Base URL open in the AUT browser window, Testim will display a notification. Click the Open base URL link in the notification and try to reassign the target element again.
697697
  1. Testim will go into standby mode. In the AUT browser, hover your mouse on the the new target element and click on it to select it.
674674

The target element is updated in the Target element box in the Properties panel.

325325

Viewing Smart Locators

Smart Locators are how Testim uniquely identifies each element on the page. Testim inspects the entire DOM and determines the attributes that are most useful in identifying the target element. These attributes include aspects of the target element itself as well as parent elements. You can view the attributes used to locate the target element on the Locators panel. You can also visually identify the target element and its parent elements.

🚧

Editing the attributes of Smart Locators is generally not recommended. Before editing the Locators, please consult support.

To view the locators of a target element in a step:

  1. Hover over the step for which you want to view the Smart Locators and click the Show Properties button.
351351

The Properties panel opens on the right-hand side.

326326
  1. Hover over the Target element thumbnail and click the View locators link.
326326

The Locators panel opens, showing the Target Element and the relevant parent elements as determined by Testim’s AI.

300300
  1. Click on the down-arrow next to an element to view the Smart Locators and the weights the AI assigned to them.
    A list of attributes that define the element are displayed. A checkmark indicates that the locator is active. The number of filled-in stars next to each attribute represent the relative weight that the AI assigned to that attribute. The higher the weight, the more the AI takes it into account.

📘

You can select/de-select different locators or edit the content. Keep in mind, that Testim's algorithm has determined these ratings automatically. Sometimes, an application will behave in an unexpected way, and manually selecting specific attributes to identify the element can be advantageous to improving stability. However, we recommend consulting with Testim Support before making such changes.

175175

If the Locators panel is opened after a test is run, in addition to the star weighting, you will see percentage scores based on the results of the run.

200200
  1. While viewing an element, you can visually identify the element by hovering over the element you wish to show and clicking on the target icon.
300300

The AUT browser opens with the chosen element momentarily highlighted.

810810

Auto Improved Locators

If Testim replaced the original locator with an auto-improved locator, the “Locator auto improved” message is shown at the top of the Locators panel. For more information, see Locators: Auto Improve.

384384