# radio\_button

A radio button is a graphical control element that is used to select one option from a set of choices.

Radio buttons are usually used in conjunction with textboxes, dropdowns, and other input controls

These can be selected or deselected by clicking it. The user typically selects one option from among two or more options.

Radio buttons are often used in forms to provide the user with mutually exclusive choices.

## Automation

When automating the radio buttons, Sometimes clicking on the selected radio button become de-selected. To handle this kind of scenarios QATTS handles the logical behavior from the user inputs.

QATTS simply checks the radio button status, If it is not in selected state. Performs click operation on web element. Refer to library for different ways of clicking. [properties-library](https://docs.qatts.com/studio/ui-elements/properties-library "mention")

My web application was maintaining the state of the radio button in different attribute. Yes, we got it handled as well.

| Property Name          | Property Value  |
| ---------------------- | --------------- |
| attName.selected       | YOUR\_ATTRIBUTE |
| attName.selected.value | DEFINED\_VALUE  |

When configured the above and at the time of execution

Step1 : QATTS extracts your attribute value (YOUR\_ATTRIBUTE ) and compares with the  DEFINED\_VALUE.

Step2 : If both doesn't match. it will click on the web element. Refer to library for different ways of clicking. [properties-library](https://docs.qatts.com/studio/ui-elements/properties-library "mention")
