# KeyValuePairHandle

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

```java
interface KeyValuePairHandle extends FormComponentHandle
```

Handle for the "Key value pair label" form component. The principal Swing widget is the value
`JLabel`, paired with a read-only key leading label.

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

## Inherited from

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

## Methods

| Signature | Returns | Description |
|---|---|---|
| [`getValueText()`](#getvaluetext) | `String` | The text currently shown in the value label. |
| [`assertValue(String)`](#assertvalue-string) | `KeyValuePairHandle` | Assert that the value label's text equals the expected value. |
| [`assertEnabled()`](#assertenabled) | `KeyValuePairHandle` |  |
| [`assertDisabled()`](#assertdisabled) | `KeyValuePairHandle` |  |
| [`assertVisible()`](#assertvisible) | `KeyValuePairHandle` |  |
| [`assertInvisible()`](#assertinvisible) | `KeyValuePairHandle` |  |

### getValueText()

```java
String getValueText()
```

The text currently shown in the value label.

### assertValue(String)

```java
KeyValuePairHandle assertValue(String expected)
```

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

### assertEnabled()

```java
KeyValuePairHandle assertEnabled()
```

### assertDisabled()

```java
KeyValuePairHandle assertDisabled()
```

### assertVisible()

```java
KeyValuePairHandle assertVisible()
```

### assertInvisible()

```java
KeyValuePairHandle assertInvisible()
```

