Class DialogFinder


public class DialogFinder extends WindowFinderTemplate<Dialog>
Understands a finder for Dialogs. This class cannot be used directly, please see WindowFinder.
  • Constructor Details

    • DialogFinder

      protected DialogFinder(String dialogName)
      Creates a new DialogFinder.
      Parameters:
      dialogName - the name of the Dialog to look for.
    • DialogFinder

      protected DialogFinder(GenericTypeMatcher<? extends Dialog> matcher)
      Creates a new DialogFinder.
      Parameters:
      matcher - specifies the search criteria to use when looking up a Dialog.
    • DialogFinder

      protected DialogFinder(Class<? extends Dialog> dialogType)
      Creates a new DialogFinder.
      Parameters:
      dialogType - the type of Dialog to look for.
  • Method Details

    • withTimeout

      public DialogFinder withTimeout(long timeout)
      Sets the timeout for this finder. The window to search should be found within the given time period.
      Overrides:
      withTimeout in class WindowFinderTemplate<Dialog>
      Parameters:
      timeout - the number of milliseconds before stopping the search.
      Returns:
      this finder.
    • withTimeout

      public DialogFinder withTimeout(long timeout, TimeUnit unit)
      Sets the timeout for this finder. The window to search should be found within the given time period.
      Overrides:
      withTimeout in class WindowFinderTemplate<Dialog>
      Parameters:
      timeout - the period of time the search should be performed.
      unit - the time unit for timeout.
      Returns:
      this finder.
    • using

      public DialogFixture using(Robot robot)
      Finds a Dialog by name or type.
      Specified by:
      using in class WindowFinderTemplate<Dialog>
      Parameters:
      robot - contains the underlying finding to delegate the search to.
      Returns:
      a DialogFixture managing the found Dialog.
      Throws:
      WaitTimedOutError - if a Dialog could not be found.
    • cast

      protected Dialog cast(Component c)
      Casts the given Component to Dialog.
      Specified by:
      cast in class ComponentFinderTemplate<Dialog>
      Parameters:
      c - the given Component.
      Returns:
      the given Component, casted to Dialog.