T
- the type of Window
this finder can search.public abstract class WindowFinderTemplate<T extends Window> extends ComponentFinderTemplate<T>
Window
finders.Modifier | Constructor and Description |
---|---|
protected |
WindowFinderTemplate(Class<? extends T> windowType)
Creates a new
WindowFinderTemplate . |
protected |
WindowFinderTemplate(GenericTypeMatcher<? extends T> matcher)
Creates a new
WindowFinderTemplate . |
protected |
WindowFinderTemplate(String windowName,
Class<? extends T> windowType)
Creates a new
WindowFinderTemplate . |
Modifier and Type | Method and Description |
---|---|
abstract AbstractWindowFixture<?,T,?> |
using(Robot robot)
Finds a
Window by name or type using the given robot. |
protected WindowFinderTemplate<T> |
withTimeout(long timeout)
Sets the timeout for this finder.
|
protected WindowFinderTemplate<T> |
withTimeout(long timeout,
TimeUnit unit)
Sets the timeout for this finder.
|
cast, findComponentWith
protected WindowFinderTemplate(@Nullable String windowName, @Nonnull Class<? extends T> windowType)
WindowFinderTemplate
.windowName
- the name of the Window
to find.windowType
- the type of the Window
to find.protected WindowFinderTemplate(@Nonnull GenericTypeMatcher<? extends T> matcher)
WindowFinderTemplate
.matcher
- specifies the search criteria to use when looking up a Window
.protected WindowFinderTemplate(@Nonnull Class<? extends T> windowType)
WindowFinderTemplate
.windowType
- the type of the Window
to find.@Nonnull protected WindowFinderTemplate<T> withTimeout(@Nonnegative long timeout)
Window
to find should be found within the given time period.withTimeout
in class ComponentFinderTemplate<T extends Window>
timeout
- the number of milliseconds before stopping the search.IllegalArgumentException
- if the timeout is a negative number.protected WindowFinderTemplate<T> withTimeout(@Nonnegative long timeout, @Nonnull TimeUnit unit)
Window
to find should be found within the given time period.withTimeout
in class ComponentFinderTemplate<T extends Window>
timeout
- the period of time the search should be performed.unit
- the time unit for timeout
.NullPointerException
- if the time unit is null
.IllegalArgumentException
- if the timeout is a negative number.@Nonnull public abstract AbstractWindowFixture<?,T,?> using(@Nonnull Robot robot)
Window
by name or type using the given robot.using
in class ComponentFinderTemplate<T extends Window>
robot
- contains the underlying finding to delegate the search to.Window
.WaitTimedOutError
- if a Window
with the given name or of the given type
could not be found.Copyright © 2014–2019 AssertJ. All rights reserved.