"If else" Scenarios in Ui Vision? I'm new, how does it work? I can elaborate in the description

Hi again @Reilly_Fox
I used to use “elseif” uivision command.

Here an example: (click in Source view (Json) tab and paste the code below, so You can have something like what is in the image)

{
“Name”: “CheckIfElse”,
“CreationDate”: “2022-2-24”,
“Commands”: [
{
“Command”: “open”,
“Target”: “https://www.nytimes.com/”,
“Value”: “”,
“Description”: “”
},
{
“Command”: “storeText”,
“Target”: “xpath=//*[@id="masthead-bar-one"]/div[1]/div[1]/span”,
“Value”: “Todaysdate”,
“Description”: “”
},
{
“Command”: “if_v2”,
“Target”: “${Todaysdate}.includes("Monday")”,
“Value”: “”,
“Description”: “”
},
{
“Command”: “executeScript_Sandbox”,
“Target”: “alert("Hello word! Today is Monday! \n Enjoy the day.");”,
“Value”: “”,
“Description”: “”
},
{
“Command”: “elseif”,
“Target”: “${Todaysdate}.includes("Tuesday")”,
“Value”: “”,
“Description”: “”
},
{
“Command”: “executeScript_Sandbox”,
“Target”: “alert("Hello word! Today is Tuesday! \n Enjoy the day.");”,
“Value”: “”,
“Description”: “”
},
{
“Command”: “elseif”,
“Target”: “${Todaysdate}.includes("Wednesday")”,
“Value”: “”,
“Description”: “”
},
{
“Command”: “executeScript_Sandbox”,
“Target”: “alert("Hello word! Today is Wednesday! \n Almost there.");”,
“Value”: “”,
“Description”: “”
},
{
“Command”: “elseif”,
“Target”: “${Todaysdate}.includes("Thursday")”,
“Value”: “”,
“Description”: “”
},
{
“Command”: “executeScript_Sandbox”,
“Target”: “alert("Hello word! Today is Thursday! \n Iupi!");”,
“Value”: “”,
“Description”: “”
},
{
“Command”: “elseif”,
“Target”: “${Todaysdate}.includes("Friday")”,
“Value”: “”,
“Description”: “”
},
{
“Command”: “executeScript_Sandbox”,
“Target”: “alert("Hello word! Today is Friday! \n Yes! We finaly here.");”,
“Value”: “”,
“Description”: “”
},
{
“Command”: “end”,
“Target”: “”,
“Value”: “”,
“Description”: “”
}
]
}

2 Likes