{
  "schema_username_note": "fill each field by its visible label, then submit",
  "schema_version": 1,
  "name": "Fill a multi-field form",
  "version": 1,
  "description": "Fill a registration or profile form field-by-field (located by each field's visible label — no CSS selectors), then submit and confirm. Bind every value to a variable or a CSV row; never hard-code personal data. To fill one form per row of a CSV, wrap the steps in a For-each-row loop.",
  "vars": {
    "form_url": "https://example.com/signup",
    "submit_text": "Create account",
    "confirm_marker": "Welcome",
    "first_name": "REPLACE_WITH_FIRST_NAME",
    "last_name": "REPLACE_WITH_LAST_NAME",
    "email": "REPLACE_WITH_EMAIL",
    "phone": "REPLACE_WITH_PHONE"
  },
  "on_error": "screenshot_and_stop",
  "steps": [
    { "open": {} },
    { "goto": { "url": "{{form_url}}" } },
    { "wait_for": { "text": "{{submit_text}}", "timeout": 15 } },
    { "type": { "into": "First name", "text": "{{first_name}}" } },
    { "type": { "into": "Last name", "text": "{{last_name}}" } },
    { "type": { "into": "Email", "text": "{{email}}" } },
    { "type": { "into": "Phone", "text": "{{phone}}" } },
    { "click": { "text": "{{submit_text}}" } },
    { "if": { "text_present": "Verify" },
      "then": [ { "stop": { "reason": "verification checkpoint — not bypassing" } } ] },
    { "wait_for": { "text": "{{confirm_marker}}", "timeout": 20 } },
    { "screenshot": { "path": "form-done.png" } },
    { "close": {} }
  ]
}
