Pre-General Availability: 2024-09-02

Add a Radio Button Action

The radio button action interacts with a radio button, such as by selecting it, determining whether any radio buttons in a group are selected, or determining whether a specific radio button is selected.

This action has specific requirements for the page's underlying HTML code. You can use this action only when a UI element element has a tag name of INPUT and a type attribute of radio.

Note:

You must use the low-code capabilities to add this action to a robot. Keep reading for step-by-step instructions.
  1. Open the robot to edit.
    1. In the navigation pane, select Projects.
    2. Select the project name.
    3. In the left toolbar, select Robot Robot.
    4. In the Robots box, select the robot to open.

      The canvas appears.

  2. Add the action to the robot.
    1. On the canvas, point to an action, and click +.
      A mouse cursor points to an action in the canvas and hovers over the plus sign button, which appears at the bottom of the rectangle that represents the action. A plus sign button also appears at the top of the rectangle, for adding an action after the current action.

      A menu of available actions appears.

    2. Select Radio Button.

      A Radio Button action appears on the canvas, and the Radio Button panel appears.

  3. In the panel, enter a Name and Description for the action.

    The Name appears on the action in the canvas and should help you and others understand the goal of the action.

  4. From Operations, select how the robot interacts with the radio button.
    • Select Radio Button: Select a radio button.

    • Is Radio Button Selected: Determine whether any radio buttons in a group are selected.

    • Is Radio Button Set To: Determine whether a radio button that you specify is selected.

  5. On the Input tab, specify details for the Value field, if it appears.

    If the operation that you selected requires you to target an individual radio button, the Value field appears on the Input tab.

    1. In another browser window, open the application that the robot needs to work in.
    2. Right-click the radio button that the robot needs to interact with, and select Inspect.
    3. In the HTML code for the page, locate the id or the value of the radio button.
    4. Type the value for the id or value into the Value field in the robot.

      You don't need to format the value in a specific way. For instance, if the id is choice1, type choice1.

  6. On the Input tab, specify details for the Group Name field.

    Every operation requires you to select the radio button group.

    1. In another browser window, open the application that the robot needs to work in.

      If you opened the application already, you don't need to open it again.

    2. Right-click one the radio button group that the robot needs to interact with, and select Inspect.
    3. In the HTML code for the page, locate the name for the radio buttons in the radio button group.
    4. Type the value for the name into the Group Name field in the robot.
  7. On the Input tab, specify whether to capture any screenshots as part of the action.
  8. If the Output tab appears, specify where to save the radio button information that you get from this action. You have the following options:

    Some radio button operations create an output.

    • Assign the value to a variable. The value is a boolean value, indicating whether a radio button is selected.

      1. Click within the Save to field, and select Variables Variables.

        The Variables panel appears.

      2. Determine whether the variable that you need appears in the list. If not, create it. See Create a Variable. The variable must have a type of boolean.

      3. Select the variable to assign the value to, and drag it to the Save to field.

    • Assign the value to a property of the output property. The value is a boolean value, indicating whether a radio button is selected.

      1. Click within the Save to field, select More options, and then select Output Output.

        The Output panel appears.

      2. Determine whether the output property that you need appears in the list. If not, create it. See Create a Trigger's Input or Output. The property must have a type of boolean.

      3. Select the output property to assign the value to, and drag it to the Save to field.

  9. On the Pre Validate and Post Validate tabs, specify whether to complete any validation before and after the action.
  10. Click OK.
  11. Above the canvas, select Save.