Skip to main content

if

Control Flow

Executes 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
if.json
{
  "command": "if",
  "params": {
    "condition": {
      "type": "element_visible",
      "selector": "css=.cart-empty",
      "iframe": ""
    },
    "then": [],
    "else": []
  }
}

Related Scenarios

Related Learning Articles

Was this helpful?