public final class FrameMatcher extends NamedComponentMatcherTemplate<Frame>
Frame by type, name or title.ANY, name| Modifier and Type | Method and Description |
|---|---|
FrameMatcher |
andShowing()
Indicates that the
to match should be showing on the screen. |
FrameMatcher |
andTitle(Pattern titlePattern)
Specifies the title to match.
|
FrameMatcher |
andTitle(String newTitle)
Specifies the title to match.
|
static FrameMatcher |
any()
Creates a new
that matches any . |
protected boolean |
isMatching(Frame frame)
Indicates whether the title of the given
is equal to the title in this matcher. |
String |
toString() |
static FrameMatcher |
withName(String name)
Creates a new
that matches a that:
has a matching name
(optionally) has matching title
(optionally) is showing on the screen |
static FrameMatcher |
withTitle(Pattern titlePattern)
Creates a new
that matches a by its title. |
static FrameMatcher |
withTitle(String title)
Creates a new
that matches a by its title. |
arePropertyValuesMatching, isNameMatching, quoted, quotedNamematches, supportedTyperequireShowing, requireShowing, requireShowingMatches, resetpublic static FrameMatcher withName(String name)
FrameMatcher that matches a Frame that:
The following code listing shows how to match a by name and title:
Frame
FrameMatcher m =withName("myApp").andTitle("My App");
The following code listing shows how to match a , that should be showing on the screen,
by name and title:
Frame
FrameMatcher m =withName("myApp").andTitle("My App").andShowing();
name - the id to match.public static FrameMatcher withTitle(String title)
FrameMatcher that matches a Frame by its title.
The following code listing shows how to match a by title:
Frame
FrameMatcher m = withTitle("My App");
The following code listing shows how to match a , that should be showing on the screen,
by title:
Frame
FrameMatcher m =withTitle("My App").andShowing();
title - the title to match. It can be a regular expression.public static FrameMatcher withTitle(Pattern titlePattern)
FrameMatcher that matches a Frame by its title.
The following code listing shows how to match a by title, using a regular expression
matcher:
Frame
FrameMatcher m = withTitle(Pattern.compile("My.*"));
The following code listing shows how to match a , that should be showing on the screen,
by title:
Frame
FrameMatcher m =withTitle(Pattern.compile("My.*")).andShowing();
titlePattern - the title to match.public static FrameMatcher any()
FrameMatcher that matches any Frame.public FrameMatcher andTitle(String newTitle)
withTitle(String) or
withTitle(Pattern), this method will simply update the title to match.newTitle - the new title to match. It can be a regular expression.public FrameMatcher andTitle(Pattern titlePattern)
withTitle(String) or
withTitle(Pattern), this method will simply update the title to match.titlePattern - the regular expression pattern to match.public FrameMatcher andShowing()
Frame to match should be showing on the screen.@RunsInCurrentThread protected boolean isMatching(Frame frame)
Frame is equal to the title in this matcher.
Note: This method is not guaranteed to be executed in the event dispatch thread (EDT.) Clients are responsible for calling this method from the EDT.
isMatching in class GenericTypeMatcher<Frame>frame - the Frame to match.true if the title in the Frame is equal to the title in this matcher,
false otherwise.Copyright © 2007-2012 FEST (Fixtures for Easy Software Testing). All Rights Reserved.