Skip to main content

forms Scenario 4 — Survey with Radio Buttons

Written by RTILA X Engineering Team

Intermediate ~6 min
Prerequisites: basic-navigation/1 search-filter/1

What You'll Learn

Handle date pickers and select dropdowns

Real-World Use Case

Booking appointments or reservations

LIVE DEMO

How often do you use web automation?
What is your primary use case?
How would you rate the tool?
How did you hear about us?
What is your experience level?
Would you recommend this tool?
What feature matters most?
How is the documentation?
What is your team size?
Would you use this for production?
EXPECTED OUTPUT

RTILA X PROJECT JSON

    {
  "name": "Survey_Radio_Submission",
  "settings": {
    "urls": [
      "https://learn.rtila.com/scenarios/forms/4"
    ]
  },
  "datasets": {
    "survey_result": {
      "item_selector": "css=#survey-result",
      "properties": [
        {
          "name": "message",
          "type": "text",
          "selector": "css=.survey-result"
        }
      ]
    }
  },
  "commands": [
    {
      "command": "wait_for_selector",
      "params": {
        "selector": "css=#survey-form"
      }
    },
    {
      "command": "click",
      "params": {
        "selector": "css=input[name='q1'][value='A']"
      }
    },
    {
      "command": "click",
      "params": {
        "selector": "css=input[name='q2'][value='B']"
      }
    },
    {
      "command": "click",
      "params": {
        "selector": "css=input[name='q3'][value='C']"
      }
    },
    {
      "command": "click",
      "params": {
        "selector": "css=input[name='q4'][value='D']"
      }
    },
    {
      "command": "click",
      "params": {
        "selector": "css=input[name='q5'][value='A']"
      }
    },
    {
      "command": "click",
      "params": {
        "selector": "css=input[name='q6'][value='B']"
      }
    },
    {
      "command": "click",
      "params": {
        "selector": "css=input[name='q7'][value='C']"
      }
    },
    {
      "command": "click",
      "params": {
        "selector": "css=input[name='q8'][value='D']"
      }
    },
    {
      "command": "click",
      "params": {
        "selector": "css=input[name='q9'][value='A']"
      }
    },
    {
      "command": "click",
      "params": {
        "selector": "css=input[name='q10'][value='B']"
      }
    },
    {
      "command": "wait_for_selector",
      "params": {
        "selector": "css=#survey-submit"
      }
    },
    {
      "command": "click",
      "params": {
        "selector": "css=#survey-submit"
      }
    },
    {
      "command": "wait_for_selector",
      "params": {
        "selector": "css=#survey-result"
      }
    },
    {
      "command": "extract_data",
      "params": {
        "dataset": "survey_result"
      }
    }
  ]
}
  

RTILA X Concepts

Radio buttons are selected using click with CSS selectors that combine the input name and value. After ten answers are selected, the form is submitted and the result is extracted.

Did you complete this scenario?

Ready to run this automation?

Copy the project JSON above, open RTILA X, create a new project, and paste it.

This scenario covers 2 RTILA X commands and is referenced in 2 learning articles.

Continue Learning

Was this helpful?