Performs actions repeatedly.
Options:
Option | Required | Description | Example |
---|---|---|---|
condition | false | (object) A brief description on condition is given in table below. | { |
iteration | false | (string | number) | 5 |
loop | true | (array) Set of actions to be executed repeatedly. | [ |
loopName | true | (string) A Name for the loop | pageLoops |
Description on option condition
Option | Required | Description | Example |
---|---|---|---|
querySelector | true | element to check if it exists in the page | .updated |
compareValue | false | The value to compare with | 2021-05-01 |
compareOperation | false | Type of condition. Possible Values : Element Exists | | Date Earlier Than |
Example 1: Press enter 5 times
{
"action": "loop",
"options": {
"loop": [
{
"action": "enter",
"options": {}
}
],
"loopName": "pressEnter",
"iteration": 5
}
}
Example 2: Clicks the element while the element is present
{
"action": "loop",
"options": {
"loop": [
{
"action": "click",
"options": {
"querySelector":"#printMe"
}
}
],
"loopName": "pressEnter",
"condition": {
"querySelector": "#printe",
}
}
}