How can I execute the body of a while if an image exists?

I would like to execute the body of a while if an image exists on the page.

The first line in the body of the while would be xClick imageToBeFound…png

But I cannot figure out how to make the while expression be true/false if the “imageToBeFound” exists.

I’m looking for something like “while visualVerify imageToBeFound” but when I use that I get an error “Unexpected token”.

I guess part of my problem is I cannot find any documentation on syntax within UIV. Do I have to enclose something in quotes or parenthesis or some kind of brace?

OCR not working

 {
      "Command": "visualSearch",
      "Target": "exptp6_dpi_132.png",
      "Value": "result",
      "Description": ""
    },
    {
      "Command": "if",
      "Target": "Number(${result}) > 0",
      "Value": "",
      "Description": ""
    },
    {
      "Command": "echo",
      "Target": "image found",
      "Value": "",
      "Description": ""
    },
    {
      "Command": "end",
      "Target": "",
      "Value": "",
      "Description": ""
    }