While loop fails to execute

My while loop fails when I set the variable expression to true.

{
  "Command": "store",
  "Target": "true",
  "Value": "warningExists",
  "Description": "Initialization while first loop. User runs macro only if Warnings exist."
},
{
  "Command": "while",
  "Target": "${warningExists} == true",
  "Value": "",
  "Description": "While first"
},

What am I doing wrong? Does case matter for true, True, TRUE?

${warningExists} == “true”

That worked. So obviously, warningExists, even though only set by the macro to true or false is still a string, unlike !statusOK which is a boolean.

Does executing a comment set !statusOK?

Does executing the End (of while loop) set !statusOK? Example:

{
“Command”: “XDesktopAutomation”,
“Target”: “True”,
“Value”: “”,
“Description”: “Turn this on. For this example, it should also set !statusOK to true.”
},
{
“Command”: “while”,
“Target”: "${!statusOK},
“Value”: “”,
“Description”: "1st While.
},
{
“Command”: “store”,
“Target”: “!ErrorIgnore”,
“Value”: “true”,
“Description”: “”
},
{
“Command”: “visualVerify”,
“Target”: “find_severity_clickonwarning_dpi_96.png”,
“Value”: “”,
“Description”: “Update while loop condition.”
},

……If I have a comment here, will that set !statusOK?
{
“Command”: “end”,
“Target”: “”,
“Value”: “”,
“Description”: “End 1st While.”
}

you can use a real true using javascript to assign the variable:

“Command”: “executeScript”,
“Target”: “return true;”,

“Value”: “warningExists”,

Ahh so.

And could I eliminate the use of “warningExists” by somehow embedding the “Command”: “visualVerify”, “Target”: “find_severity_clickonwarning_dpi_96.png” in the body of the while() loop? If so, how?

to simplify you can use a variable and set value
use that variable for while loop
check for element and change variable value accordingly