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

# Interface DirectoryChooserHandle

All Superinterfaces:
  `FormComponentHandle`

public interface DirectoryChooserHandle extends FormComponentHandle
Handle for the "Directory chooser" or "Installation directory chooser" form component. The principal Swing widget is the `JTextField` holding the selected directory's path.

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

- ## Method Summary

  Modifier and Type
  Method
  Description
  `DirectoryChooserHandle`
  `assertDirectory(File expected)`
  Assert the currently selected directory equals the expected value, compared as absolute paths.
  `DirectoryChooserHandle`
  `assertDisabled()`
  `DirectoryChooserHandle`
  `assertEnabled()`
  `DirectoryChooserHandle`
  `assertExists()`
  Assert the currently selected directory exists on disk.
  `DirectoryChooserHandle`
  `assertInvisible()`
  `DirectoryChooserHandle`
  `assertVisible()`
  `DirectoryChooserHandle`
  `browse()`
  Click the Browse button.
  `File`
  `getDirectory()`
  The currently selected directory.
  `DirectoryChooserHandle`
  `setDirectory(File directory)`
  Set the selected directory.

  ### Methods inherited from interface FormComponentHandle

  `getId, isEnabled, isVisible`

- ## Method Details

  - ### getDirectory

    @NotNull File getDirectory()
    The currently selected directory.

  - ### setDirectory

    @NotNull DirectoryChooserHandle setDirectory(@NotNull File directory)
    Set the selected directory.

  - ### browse

    @NotNull DirectoryChooserHandle browse()
    Click the Browse button. The resulting `JFileChooser` dialog is reachable via `session.fileChooser`.

  - ### assertDirectory

    @NotNull DirectoryChooserHandle assertDirectory(@NotNull File expected)
    Assert the currently selected directory equals the expected value, compared as absolute paths.

  - ### assertExists

    @NotNull DirectoryChooserHandle assertExists()
    Assert the currently selected directory exists on disk.

  - ### assertEnabled

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

  - ### assertDisabled

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

  - ### assertVisible

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

  - ### assertInvisible

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