Interface UserSelectorHandle

All Superinterfaces:
FormComponentHandle

public interface UserSelectorHandle extends FormComponentHandle
Handle for the "Windows user selector" form component. The principal Swing widget is a non-editable JTextField showing the currently selected Windows users, paired with a Browse button and an optional Create User button that open native Windows pickers.

Platform note: The Browse and Create User pickers are Windows-only. On Linux and macOS the native picker code returns immediately without making a selection, leaving the form's selected SIDs unchanged. Tests on non-Windows platforms can verify that the form component renders, read the displayed account names, and inspect which buttons are present, but cannot drive an actual user pick.

Reach this handle via ScreenHandle.userSelector().

  • Method Details

    • getDisplayedText

      @NotNull String getDisplayedText()
      The text currently shown in the read-only text field, typically a semicolon-separated list of account names, or the empty string when nothing has been selected.
    • getSelectedSids

      @NotNull String[] getSelectedSids()
      The SIDs currently selected on this form, or an empty array if nothing has been picked. Returns a defensive copy.
    • isCreateButtonShown

      boolean isCreateButtonShown()
      Whether the Create User button is rendered on this form.
    • clickBrowse

      @NotNull UserSelectorHandle clickBrowse()
      Click the Browse button. On Windows this opens the ObjectPicker native dialog. On Linux and macOS it returns immediately without picking, so the selection is unchanged.
    • clickCreateUser

      @NotNull UserSelectorHandle clickCreateUser()
      Click the Create User button. On Windows this opens the CreateUserDialog, which the test reaches via session.createUserDialog. Throws ComponentNotFoundException if the form does not render the Create button. On non-Windows platforms the click is a no-op at the form component level.
    • assertEnabled

      @NotNull UserSelectorHandle assertEnabled()
      Specified by:
      assertEnabled in interface FormComponentHandle
    • assertDisabled

      @NotNull UserSelectorHandle assertDisabled()
      Specified by:
      assertDisabled in interface FormComponentHandle
    • assertVisible

      @NotNull UserSelectorHandle assertVisible()
      Specified by:
      assertVisible in interface FormComponentHandle
    • assertInvisible

      @NotNull UserSelectorHandle assertInvisible()
      Specified by:
      assertInvisible in interface FormComponentHandle