# LicenseHandle

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

```java
interface LicenseHandle extends FormComponentHandle
```

Handle for the "License agreement" form component. The Swing widget is a
`JEditorPane` that renders the license text.

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

## Inherited from

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

## Methods

| Signature | Returns | Description |
|---|---|---|
| [`getDisplayedText()`](#getdisplayedtext) | `String` | The rendered license text with HTML stripped. |
| [`accept()`](#accept) | `LicenseHandle` | Select the accept radio button. |
| [`reject()`](#reject) | `LicenseHandle` | Select the refuse radio button. |
| [`isAccepted()`](#isaccepted) | `boolean` | Whether the accept radio button is currently selected. |
| [`isReadAllRequired()`](#isreadallrequired) | `boolean` | Whether the read-all-required option is enabled on the form component. |
| [`hasBeenScrolledToBottom()`](#hasbeenscrolledtobottom) | `boolean` | Whether the user has scrolled to the bottom of the license at least once. |
| [`scrollToBottom()`](#scrolltobottom) | `LicenseHandle` | Scroll the license text pane to the bottom and wait for the runtime to register the scroll. |
| [`scrollToBottom(Duration)`](#scrolltobottom-duration) | `LicenseHandle` | Same as [`LicenseHandle.scrollToBottom`](LicenseHandle.md#scrolltobottom) but with an explicit timeout for the scroll-registered check. |
| [`assertEnabled()`](#assertenabled) | `LicenseHandle` |  |
| [`assertDisabled()`](#assertdisabled) | `LicenseHandle` |  |
| [`assertVisible()`](#assertvisible) | `LicenseHandle` |  |
| [`assertInvisible()`](#assertinvisible) | `LicenseHandle` |  |

### getDisplayedText()

```java
String getDisplayedText()
```

The rendered license text with HTML stripped.

### accept()

```java
LicenseHandle accept()
```

Select the accept radio button.

### reject()

```java
LicenseHandle reject()
```

Select the refuse radio button.

### isAccepted()

```java
boolean isAccepted()
```

Whether the accept radio button is currently selected.

### isReadAllRequired()

```java
boolean isReadAllRequired()
```

Whether the read-all-required option is enabled on the form component.

### hasBeenScrolledToBottom()

```java
boolean hasBeenScrolledToBottom()
```

Whether the user has scrolled to the bottom of the license at least once.

### scrollToBottom()

```java
LicenseHandle scrollToBottom()
```

Scroll the license text pane to the bottom and wait for the runtime to register the scroll.
Required before [`LicenseHandle.accept`](LicenseHandle.md#accept) when [`LicenseHandle.isReadAllRequired`](LicenseHandle.md#isreadallrequired) is true.

### scrollToBottom(Duration)

```java
LicenseHandle scrollToBottom(Duration timeout)
```

Same as [`LicenseHandle.scrollToBottom`](LicenseHandle.md#scrolltobottom) but with an explicit timeout for the scroll-registered check.

### assertEnabled()

```java
LicenseHandle assertEnabled()
```

### assertDisabled()

```java
LicenseHandle assertDisabled()
```

### assertVisible()

```java
LicenseHandle assertVisible()
```

### assertInvisible()

```java
LicenseHandle assertInvisible()
```

