public class DialogFinder extends WindowFinderTemplate<Dialog>
Dialog
s. This class cannot be used directly, please see WindowFinder
.Modifier | Constructor and Description |
---|---|
protected |
DialogFinder(Class<? extends Dialog> dialogType)
Creates a new
DialogFinder . |
protected |
DialogFinder(GenericTypeMatcher<? extends Dialog> matcher)
Creates a new
DialogFinder . |
protected |
DialogFinder(String dialogName)
Creates a new
DialogFinder . |
Modifier and Type | Method and Description |
---|---|
protected Dialog |
cast(Component c)
Casts the given AWT or Swing
Component to Dialog . |
DialogFixture |
using(Robot robot)
Finds a
Dialog by name or type. |
DialogFinder |
withTimeout(long timeout)
Sets the timeout for this finder.
|
DialogFinder |
withTimeout(long timeout,
TimeUnit unit)
Sets the timeout for this finder.
|
findComponentWith
protected DialogFinder(@Nullable String dialogName)
DialogFinder
.dialogName
- the name of the Dialog
to look for.protected DialogFinder(@Nonnull GenericTypeMatcher<? extends Dialog> matcher)
DialogFinder
.matcher
- specifies the search criteria to use when looking up a Dialog
.protected DialogFinder(@Nonnull Class<? extends Dialog> dialogType)
DialogFinder
.dialogType
- the type of Dialog
to look for.@Nonnull public DialogFinder withTimeout(@Nonnegative long timeout)
withTimeout
in class WindowFinderTemplate<Dialog>
timeout
- the number of milliseconds before stopping the search.@Nonnull public DialogFinder withTimeout(@Nonnegative long timeout, @Nonnull TimeUnit unit)
withTimeout
in class WindowFinderTemplate<Dialog>
timeout
- the period of time the search should be performed.unit
- the time unit for timeout
.@Nonnull public DialogFixture using(@Nonnull Robot robot)
Dialog
by name or type.using
in class WindowFinderTemplate<Dialog>
robot
- contains the underlying finding to delegate the search to.DialogFixture
managing the found Dialog
.WaitTimedOutError
- if a Dialog
could not be found.Copyright © 2014–2019 AssertJ. All rights reserved.