Skip to main content

Conditional Loop

Command description

Runs the indented child commands repeatedly while the configured conditions are met. The loop stops when the conditions are no longer met. Nested loops are supported.

Command Input Parameters

input parametersInput parameter typeDescription
l1PythonExpressionAny Python expression, Python literal, etc.
r1PythonExpressionAny Python expression, Python literal, etc.
c1enumOptional values are Equals, Does Not Equal, Greater Than, Less Than or Equal To, Less Than, Greater Than or Equal To, Contains, Does Not Contain, Starts With, Does Not Start With, Ends With, Does Not End With, Length Equals, Length Does Not Equal, Length Greater Than, Length Less Than
conditionenumHow multiple condition groups are combined: All Conditions or Any Condition

Parameter group rules:

  • You can configure any number of sets of conditional parameters. The parameter names must be in ascending order: l1/r1/c1, l2/r2/c2, l3/r3/c3...
  • Each group must contain the three parameters lN, rN and cN at the same time, no missing items are allowed.
  • The serial number must start from 1 and increase continuously, do not skip numbers.
  • Include condition only once to specify how all parameter groups are combined.

Command Output Parameters

None

Example 1

{
"ins": "Conditional Loop",
"in": {
"l1": "webPage.url",
"r1": "'runavelo.com'",
"c1": "'Equals'",

"l2": "webPage.title",
"r2": "''",
"c2": "'Does Not Equal'",

"l3": "[1,2,3]",
"r3": "{'a':1,'b':2}",
"c3": "'Does Not Equal'",

"l4": "['1','2','3']",
"r4": "'2'",
"c4": "'Contains'",

"condition": "'All Conditions'"
}
}