# LabelHandle

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

```java
interface LabelHandle extends FormComponentHandle
```

Handle for the "Label" form component. The Swing widget is a single-line `JLabel`.

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

## Inherited from

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

## Methods

| Signature | Returns | Description |
|---|---|---|
| [`getText()`](#gettext) | `String` | The current label text. |
| [`assertText(String)`](#asserttext-string) | `LabelHandle` | Assert that the label's text equals the expected value. |
| [`assertEnabled()`](#assertenabled) | `LabelHandle` |  |
| [`assertDisabled()`](#assertdisabled) | `LabelHandle` |  |
| [`assertVisible()`](#assertvisible) | `LabelHandle` |  |
| [`assertInvisible()`](#assertinvisible) | `LabelHandle` |  |

### getText()

```java
String getText()
```

The current label text.

### assertText(String)

```java
LabelHandle assertText(String expected)
```

Assert that the label's text equals the expected value.

### assertEnabled()

```java
LabelHandle assertEnabled()
```

### assertDisabled()

```java
LabelHandle assertDisabled()
```

### assertVisible()

```java
LabelHandle assertVisible()
```

### assertInvisible()

```java
LabelHandle assertInvisible()
```

