LogFileViewerHandle (install4j API)
Description: declaration: package: com.install4j.api.test.formcomponents, interface: LogFileViewerHandle

# Interface LogFileViewerHandle

All Superinterfaces:
  `FormComponentHandle`

public 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()`.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `LogFileViewerHandle`
  `assertDisabled()`
  `LogFileViewerHandle`
  `assertEnabled()`
  `LogFileViewerHandle`
  `assertInvisible()`
  `LogFileViewerHandle`
  `assertLogContains(String substring)`
  Assert that the displayed log contains the given substring.
  `LogFileViewerHandle`
  `assertVisible()`
  `String`
  `getDisplayedLog()`
  The current log content as displayed in the text area.
  `File`
  `getFile()`
  The log file the form component is configured to tail, with variable substitution applied.
  `LogFileViewerHandle`
  `waitForLogContaining(String substring, Duration timeout)`
  Block until the displayed log contains the given substring, or throw an `AssertionError` after the given timeout.

  ### Methods inherited from interface FormComponentHandle

  `getId, isEnabled, isVisible`

- ## Method Details

  - ### getFile

    @Nullable File getFile()
    The log file the form component is configured to tail, with variable substitution applied.

  - ### getDisplayedLog

    @NotNull String getDisplayedLog()
    The current log content as displayed in the text area.

  - ### waitForLogContaining

    @NotNull LogFileViewerHandle waitForLogContaining(@NotNull String substring, @NotNull Duration timeout)
    Block until the displayed log contains the given substring, or throw an `AssertionError` after the given timeout.

  - ### assertLogContains

    @NotNull LogFileViewerHandle assertLogContains(@NotNull String substring)
    Assert that the displayed log contains the given substring.

  - ### assertEnabled

    @NotNull LogFileViewerHandle assertEnabled()
    Specified by:
      `assertEnabled` in interface `FormComponentHandle`

  - ### assertDisabled

    @NotNull LogFileViewerHandle assertDisabled()
    Specified by:
      `assertDisabled` in interface `FormComponentHandle`

  - ### assertVisible

    @NotNull LogFileViewerHandle assertVisible()
    Specified by:
      `assertVisible` in interface `FormComponentHandle`

  - ### assertInvisible

    @NotNull LogFileViewerHandle assertInvisible()
    Specified by:
      `assertInvisible` in interface `FormComponentHandle`