# RadioButtonsHandle

Import: `import com.install4j.api.test.formcomponents.RadioButtonsHandle;`

```java
interface RadioButtonsHandle extends FormComponentHandle
```

Handle for the "Radio button group" form component. The widget is a single form component that
internally renders a group of `JRadioButton`s sharing the same bound installer variable.

Reach this handle via [`ScreenHandle.radioButtons`](../ui/ScreenHandle.md#radiobuttons).

## Inherited from

- [FormComponentHandle](FormComponentHandle.md) — 7 methods

## Methods

| Signature | Returns | Description |
|---|---|---|
| [`getLabels()`](#getlabels) | `List<String>` | The configured radio button labels. |
| [`getSelectedLabel()`](#getselectedlabel) | `String` | The label of the currently selected radio button, or empty if none is selected. |
| [`getSelectedIndex()`](#getselectedindex) | `int` | The index of the currently selected radio button, or `-1` if none is selected. |
| [`selectLabel(String)`](#selectlabel-string) | `RadioButtonsHandle` | Select the radio button whose label equals the given value. |
| [`selectIndex(int)`](#selectindex-int) | `RadioButtonsHandle` | Select the radio button at the given index. |
| [`assertSelectedLabel(String)`](#assertselectedlabel-string) | `RadioButtonsHandle` | Assert that the currently selected label equals the expected value. |
| [`assertEnabled()`](#assertenabled) | `RadioButtonsHandle` |  |
| [`assertDisabled()`](#assertdisabled) | `RadioButtonsHandle` |  |
| [`assertVisible()`](#assertvisible) | `RadioButtonsHandle` |  |
| [`assertInvisible()`](#assertinvisible) | `RadioButtonsHandle` |  |

### getLabels()

```java
List<String> getLabels()
```

The configured radio button labels.

### getSelectedLabel()

```java
String getSelectedLabel()
```

The label of the currently selected radio button, or empty if none is selected.

### getSelectedIndex()

```java
int getSelectedIndex()
```

The index of the currently selected radio button, or `-1` if none is selected.

### selectLabel(String)

```java
RadioButtonsHandle selectLabel(String label)
```

Select the radio button whose label equals the given value.

### selectIndex(int)

```java
RadioButtonsHandle selectIndex(int index)
```

Select the radio button at the given index.

### assertSelectedLabel(String)

```java
RadioButtonsHandle assertSelectedLabel(String expected)
```

Assert that the currently selected label equals the expected value.

### assertEnabled()

```java
RadioButtonsHandle assertEnabled()
```

### assertDisabled()

```java
RadioButtonsHandle assertDisabled()
```

### assertVisible()

```java
RadioButtonsHandle assertVisible()
```

### assertInvisible()

```java
RadioButtonsHandle assertInvisible()
```

