gotoIf - Error in condition of gotoIf_v2: Invalid or unexpected token

You re-used code from the deprecated gotoIf command with the new gotoIf_v2 command.

GotoIf_V2 uses executeScript_Sandbox

UI Vision Selenium IDE++ V5.0 uses executeScript_Sandbox to evaluate the expression. The old “GotoIf” continues to use storeEval. Please read here about the difference.

In the macro source code the new version of GOTOIF is “Command”: “GotoIf_v2”. The old version continues to use “Command”: “GotoIf” for backward-compatibility.

After updating to the new syntax it works:

{
  "Name": "syntax",
  "CreationDate": "2020-10-18",
  "Commands": [
    {
      "Command": "store",
      "Target": "Sold",
      "Value": "searchText"
    },
    {
      "Command": "store",
      "Target": "Sold",
      "Value": "rowText"
    },
    {
      "Command": "gotoIf_v2",
      "Target": "${searchText}!=${rowText}",
      "Value": "done"
    },
    {
      "Command": "label",
      "Target": "done",
      "Value": ""
    }
  ]
}
1 Like