Skip to main content

Parallel List Loop

Command description

  • Execute indented child commands in parallel using multiple threads. The next sibling command runs only after every parallel iteration finishes.
  • This is commonly used to operate multiple mobile devices or webpages concurrently.

Command Input Parameters

input parametersInput parameter typeDescription
List Objectlist[any]List to iterate, such as a similar-element list or webpage list; may also be a Python list literal
Reverse IterationboolWhether to iterate from the end of the list; default: False

Command Output Parameters

Output parametersOutput parameter typeDescription
Current ItemanyCurrent list item
Current IndexintCurrent zero-based index

Example 1

In the following workflow, line 5 runs only after every mobile device has opened the specified application.

Example 2

Use a Python list literal as the parallel loop input. The value of in["List Object"] is a Python expression; Runavelo inserts it into the generated Python source.

[
{
"in": {
"List Object": "[1,2,3]",
"Reverse Iteration": "False"
},
"out": {
"Current Item": "listItem",
"Current Index": "listIndex"
},
"ins": "Parallel List Loop"
}
]

Operate Multiple Webpages Concurrently