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 parameters | Input parameter type | Description |
|---|---|---|
| List Object | list[any] | List to iterate, such as a similar-element list or webpage list; may also be a Python list literal |
| Reverse Iteration | bool | Whether to iterate from the end of the list; default: False |
Command Output Parameters
| Output parameters | Output parameter type | Description |
|---|---|---|
| Current Item | any | Current list item |
| Current Index | int | Current 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"
}
]