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

# Interface FormFileChooserHandle

All Superinterfaces:
  `FormComponentHandle`

public interface FormFileChooserHandle extends FormComponentHandle
Handle for the "File chooser" form component. The principal Swing widget is the `JTextField` holding the path, paired with a Browse button that opens a `JFileChooser` dialog.

Not to be confused with `com.install4j.api.test.ui.FileChooserHandle`, which wraps the modal `JFileChooser` dialog shown by the Browse button.

Reach this handle via `ScreenHandle.formFileChooser()`.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `FormFileChooserHandle`
  `assertDisabled()`
  `FormFileChooserHandle`
  `assertEnabled()`
  `FormFileChooserHandle`
  `assertFile(File expected)`
  Assert the currently selected file equals the expected value.
  `FormFileChooserHandle`
  `assertInvisible()`
  `FormFileChooserHandle`
  `assertVisible()`
  `FormFileChooserHandle`
  `browse()`
  Click the Browse button.
  `File`
  `getFile()`
  The currently selected file.
  `FormFileChooserHandle`
  `setFile(File file)`
  Set the selected file.

  ### Methods inherited from interface FormComponentHandle

  `getId, isEnabled, isVisible`

- ## Method Details

  - ### getFile

    @NotNull File getFile()
    The currently selected file.

  - ### setFile

    @NotNull FormFileChooserHandle setFile(@NotNull File file)
    Set the selected file.

  - ### browse

    @NotNull FormFileChooserHandle browse()
    Click the Browse button. The resulting `JFileChooser` dialog can be reached via `session.fileChooser`.

  - ### assertFile

    @NotNull FormFileChooserHandle assertFile(@NotNull File expected)
    Assert the currently selected file equals the expected value.

  - ### assertEnabled

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

  - ### assertDisabled

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

  - ### assertVisible

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

  - ### assertInvisible

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