if
Control FlowExecutes a branch of commands based on a condition object.
Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
condition | object | Yes | — | Condition object with type field |
then | array | Yes | — | Commands to run when condition is true |
else | array | No | [] | Commands to run when condition is false |
Usage Example
RTILA X PROJECT JSON
{
"command": "if",
"params": {
"condition": {
"type": "element_visible",
"selector": "css=.cart-empty",
"iframe": ""
},
"then": [],
"else": []
}
}
Related Scenarios
- View /scenarios/conditional-logic/1 · conditional logic
Related Learning Articles
Was this helpful?
Thank you for your feedback!