Hi, I’d like to know how to deal with this command:
{
"Command": "store",
"Target": "${!statusOK}",
"Value": "true"
}
The following macro opens a page and clicks on the button Connect. If it fails I want to set ${!statusOK} to true and then the macro to look for the Connect button again in another page.
- If the macro clicks on Connect either the first or the second time – it should echo OK
- If the macro fails both times, then the macro should echo ERROR
However, the macro is performing as follows:
- If it finds the button Connect --> it echoes OK
- If if finds the button Connect on the second page --> it echoes ERROR but it should say OK
- If it doesn’t find the button --> is echoes ERROR
My issue is related to (2.). The macro echoes an error when it finds the Connect button the second time. I don’t know how I should use the previous command
{ "Command": "store", "Target": "${!statusOK}", "Value": "true" },
Macro below:
{
"Command": "store",
"Target": "true",
"Value": "!errorignore"
},
{
"Command": "csvRead",
"Target": "plantilla.csv",
"Value": ""
},
{
"Command": "open",
"Target": "${!col10}",
"Value": ""
},
{
"Command": "click",
"Target": "//*[text()[contains(.,'Conectar')]]",
"Value": ""
},
{
"Command": "if_v2",
"Target": "${!statusOK} == false",
"Value": ""
},
{
"Command": "store",
"Target": "${!statusOK}",
"Value": "true"
},
{
"Command": "open",
"Target": "${!col5}",
"Value": ""
},
{
"Command": "click",
"Target": "//*[text()[contains(.,'Conectar')]]",
"Value": ""
},
{
"Command": "end",
"Target": "",
"Value": ""
},
{
"Command": "if_v2",
"Target": "${!statusOK} == false",
"Value": ""
},
{
"Command": "echo",
"Target": "ERROR",
"Value": "#shownotification"
},
{
"Command": "else",
"Target": "",
"Value": ""
},
{
"Command": "echo",
"Target": "OK",
"Value": ""
},
{
"Command": "end",
"Target": "",
"Value": ""
}
Any help will be grately appreciated.