# LogFileViewerHandle

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

```java
interface LogFileViewerHandle extends FormComponentHandle
```

Handle for the "Log file viewer" form component. The Swing widget is a read-only
`JTextArea` that tails a log file and updates as new lines arrive.

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

## Inherited from

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

## Methods

| Signature | Returns | Description |
|---|---|---|
| [`getFile()`](#getfile) | `File` | The log file the form component is configured to tail, with variable substitution applied. |
| [`getDisplayedLog()`](#getdisplayedlog) | `String` | The current log content as displayed in the text area. |
| [`waitForLogContaining(String, Duration)`](#waitforlogcontaining-string-duration) | `LogFileViewerHandle` | Block until the displayed log contains the given substring, or throw an `AssertionError` after the given timeout. |
| [`assertLogContains(String)`](#assertlogcontains-string) | `LogFileViewerHandle` | Assert that the displayed log contains the given substring. |
| [`assertEnabled()`](#assertenabled) | `LogFileViewerHandle` |  |
| [`assertDisabled()`](#assertdisabled) | `LogFileViewerHandle` |  |
| [`assertVisible()`](#assertvisible) | `LogFileViewerHandle` |  |
| [`assertInvisible()`](#assertinvisible) | `LogFileViewerHandle` |  |

### getFile()

```java
@Nullable File getFile()
```

The log file the form component is configured to tail, with variable substitution applied.

### getDisplayedLog()

```java
String getDisplayedLog()
```

The current log content as displayed in the text area.

### waitForLogContaining(String, Duration)

```java
LogFileViewerHandle waitForLogContaining(String substring, Duration timeout)
```

Block until the displayed log contains the given substring, or throw an `AssertionError`
after the given timeout.

### assertLogContains(String)

```java
LogFileViewerHandle assertLogContains(String substring)
```

Assert that the displayed log contains the given substring.

### assertEnabled()

```java
LogFileViewerHandle assertEnabled()
```

### assertDisabled()

```java
LogFileViewerHandle assertDisabled()
```

### assertVisible()

```java
LogFileViewerHandle assertVisible()
```

### assertInvisible()

```java
LogFileViewerHandle assertInvisible()
```

