Class FrameFinder


public class FrameFinder extends WindowFinderTemplate<Frame>
Understands a finder for Frames. This class cannot be used directly, please see WindowFinder.
  • Constructor Details

    • FrameFinder

      protected FrameFinder(String frameName)
      Creates a new FrameFinder.
      Parameters:
      frameName - the name of the Frame to look for.
    • FrameFinder

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

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

    • withTimeout

      public FrameFinder 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<Frame>
      Parameters:
      timeout - the number of milliseconds before stopping the search.
      Returns:
      this finder.
    • withTimeout

      public FrameFinder 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<Frame>
      Parameters:
      timeout - the period of time the search should be performed.
      unit - the time unit for timeout.
      Returns:
      this finder.
    • using

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

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