# ButtonHandle

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

```java
interface ButtonHandle extends FormComponentHandle
```

Handle for the "Button" form component. The Swing widget is a `JButton`.

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

## Inherited from

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

## Methods

| Signature | Returns | Description |
|---|---|---|
| [`getText()`](#gettext) | `String` | The button's label text. |
| [`click()`](#click) | `ButtonHandle` | Click the button. |
| [`assertEnabled()`](#assertenabled) | `ButtonHandle` |  |
| [`assertDisabled()`](#assertdisabled) | `ButtonHandle` |  |
| [`assertVisible()`](#assertvisible) | `ButtonHandle` |  |
| [`assertInvisible()`](#assertinvisible) | `ButtonHandle` |  |

### getText()

```java
String getText()
```

The button's label text.

### click()

```java
ButtonHandle click()
```

Click the button.

### assertEnabled()

```java
ButtonHandle assertEnabled()
```

### assertDisabled()

```java
ButtonHandle assertDisabled()
```

### assertVisible()

```java
ButtonHandle assertVisible()
```

### assertInvisible()

```java
ButtonHandle assertInvisible()
```

