How to accomplish a task with if/else if

How can I accomplish this task using UI Vision RPA, if the action of clicking on “this” is not possible, then if the action of clicking on “click2” is not possible, then clicking on “click3”?

Command": “if”,
“Target”: “”,
“Value”: “”,
“Description”: “”
},
{
“Command”: “XClick”,
“Target”: “capture.png”,
“Value”: “”,
“Description”: “”
},
{
“Command”: “elseif”,
“Target”: “capture1.png”,
“Value”: “”,
“Description”: “”
},
{
“Command”: “elseif”,
“Target”: “capture2.png”,
“Value”: “”,
“Description”: “”
},
{

Here example of the command

https://ui.vision/rpa/docs/selenium-ide/if

If, else if, else, end => Flow Control - Selenium IDE Commands Tutorial << the webpage does NOT have and example of using elseIF. An example would be nice.

Thank You

use sourceSearch or storeXpathCount to count how often the element exist (0 = no does not exist) and then do your if statement based on the value of count

if count == 0 then
… does not exist
else
… exist
end