Looping is failing to count properly with if/else statement
I was running my script in a loop with "if" statement and looks like if loop goes over 9 with "if" statement in the middle (if var > 3) it starts treating numbers from 1 again. I already created a ticket awhile back with similar issue but now looks like it is back. Please, use script below in your test case and monitor "if" statement boolean value. It is "false" until it var < 3 which is correct, then it is "true" till var=9 and then it is "false" when var>9 which is an issue because 10 is bigger than 3. Anyone else experiencing same problem?
Just copy/paste it in your advanced view to run.
{
"steps" : [
{
"command" : "LOOP",
"args" : {
"variableName" : "test",
"from" : "1",
"to" : "15",
"increment" : "1"
}
},
{
"command" : "PRINT",
"args" : {
"message" : "@test"
}
},
{
"command" : "IF",
"args" : {
"operator" : "GREATER",
"comparisonType" : "TEXT",
"caseSensitive" : false,
"leftValue" : "@test",
"rightValue" : "3"
}
},
{
"command" : "END_IF",
"args" : { }
},
{
"command" : "LOOP_END",
"args" : { }
}
]
}
Please sign in to leave a comment.