Disable xpath approximation?

I’m not sure if this is the correct term, but I’ve noticed during my use of UI Vision that, when running a click or other command, if the xpath cannot be found but an approximation exists, it will click that instead once the timer expires.

Is there a way to disable this feature? I find it often obfuscates the actual failure that I’m trying to detect and/or fix…

A high level example:

  • On page 1, click button 1.
  • But button 1 cannot be found.
  • Button 2 exists, but is a complete different function.
  • After timer expires, button 2 is clicked, even though it’s a different xpath to what was passed into the click command.
  • Macro continues to run as if no element was missing.

These retries are the values in the TARGETS field in the macros. They are added during recording for classic macros (not the new JS afaik). So to disable retries of different locators, remove the complete "Targets": [ ... ], box.

Example: => here it would retry with “id=12345” if the first anchor is not found.

{
  "Command": "click",
  "Target": "name=setaSimplesAvancar",
  "Value": "",
  "Targets": [
    "name=setaSimplesAvancar",
    "id=12345"
  ],
  "Description": ""
}

]