|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.netbeans.jemmy.Waiter
org.netbeans.jemmy.WindowWaiter
org.netbeans.jemmy.FrameWaiter
public class FrameWaiter
Contains methods to search and wait Frame.
A FrameWaiter is a utility class used to look or wait for Frames.
It contains methods to search for a Frame among the currently
showing Frames as well as methods that wait for a Frame to show
within an allotted time period.
Timeouts used:
FrameWaiter.WaitFrameTimeout - time to wait frame displayed.
FrameWaiter.AfterFrameTimeout - time to sleep after frame has been displayed.
Timeouts| Constructor Summary | |
|---|---|
FrameWaiter()
Constructor. |
|
| Method Summary | |
|---|---|
protected String |
getActionProducedMessage(long timeSpent,
Object result)
Overrides WindowWaiter.getActionProducedMessage. |
static Frame |
getFrame(ComponentChooser cc)
Searches for a Frame. |
static Frame |
getFrame(ComponentChooser cc,
int index)
Searches for a Frame. |
static Frame |
getFrame(String title,
boolean ce,
boolean cc)
Searches for a Frame by title. |
static Frame |
getFrame(String title,
boolean ce,
boolean cc,
int index)
Searches for a Frame by title. |
protected String |
getGoldenActionProducedMessage()
Returns message to be printed int golden output when waiting has been successfully finished. |
protected String |
getGoldenTimeoutExpiredMessage()
Returns message to be printed int golden output when waiting timeout has been expired. |
protected String |
getGoldenWaitingStartedMessage()
Returns message to be printed int golden output before waiting start. |
TestOut |
getOutput()
Returns print output streams or writers. |
protected String |
getTimeoutExpiredMessage(long timeSpent)
Overrides WindowWaiter.getTimeoutExpiredMessage. |
Timeouts |
getTimeouts()
Return current timeouts. |
protected String |
getWaitingStartedMessage()
Returns message to be printed before waiting start. |
void |
setOutput(TestOut output)
Defines print output streams or writers. |
void |
setTimeouts(Timeouts timeouts)
Defines current timeouts. |
Frame |
waitFrame(ComponentChooser ch)
Waits for a Frame to show. |
Frame |
waitFrame(ComponentChooser ch,
int index)
Waits for a Frame to show. |
Frame |
waitFrame(String title,
boolean compareExactly,
boolean compareCaseSensitive)
Waits for a Frame to show. |
Frame |
waitFrame(String title,
boolean compareExactly,
boolean compareCaseSensitive,
int index)
Waits for a Frame to show. |
| Methods inherited from class org.netbeans.jemmy.WindowWaiter |
|---|
actionProduced, getComponentChooser, getDescription, getOwner, getWindow, getWindow, getWindow, getWindow, setComponentChooser, setOwner, waitWindow, waitWindow, waitWindow, waitWindow |
| Methods inherited from class org.netbeans.jemmy.Waiter |
|---|
setTimeoutsToCloneOf, setWaitingTimeOrigin, timeFromStart, waitAction |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public FrameWaiter()
| Method Detail |
|---|
public static Frame getFrame(ComponentChooser cc)
ComponentChooser parameter.
cc - A component chooser used to define and apply the search criteria.
null reference is returned.
public static Frame getFrame(ComponentChooser cc,
int index)
index+1'th Frame that meets the criteria defined and
applied by the ComonentChooser parameter.
cc - A component chooser used to define and apply the search criteria.index - The ordinal index of the Frame in the set of currently displayed
Frames. The first index is 0.
index+1'th Frame that is showing
and that meets the search criteria. If there are fewer than
index+1 Frames, a null reference is returned.
public static Frame getFrame(String title,
boolean ce,
boolean cc)
title - Frame title or subtitle.ce - If true and the search is case sensitive, then a
match occurs when the title argument is a substring of a
Frame title. If false and the search is case sensitive,
then the title argument and the Frame title must be the same.
If true and the search is case insensitive, then a match occurs
when the title argument is a substring of the Frame title after
changing both to upper case. If false and the search is case
insensitive, then a match occurs when the title argument is a
substring of the Frame title after changing both to upper case.cc - If true the search is case sensitive; otherwise, the
search is case insensitive.
null
reference is returned.
public static Frame getFrame(String title,
boolean ce,
boolean cc,
int index)
index+1'th Frame among the currently
showing Frames that possess a suitable title.
title - Frame title or subtitle.ce - If true and the search is case sensitive, then a
match occurs when the title argument is a substring of a
Frame title. If false and the search is case sensitive,
then the title argument and the Frame title must be the same.
If true and the search is case insensitive, then a match occurs
when the title argument is a substring of the Frame title after
changing both to upper case. If false and the search is case
insensitive, then a match occurs when the title argument is a
substring of the Frame title after changing both to upper case.cc - If true the search is case sensitive; otherwise, the
search is case insensitive.index - The ordinal index of the Frame in the set of currently displayed
Frames. The first index is 0.
index+1'th Frame that is showing
and that has a suitable title. If there are fewer than
index+1 Frames, a null reference is returned.public void setTimeouts(Timeouts timeouts)
setTimeouts in interface TimeoutablesetTimeouts in class WindowWaitertimeouts - A collection of timeout assignments.Timeoutable,
Timeouts,
getTimeouts()public Timeouts getTimeouts()
getTimeouts in interface TimeoutablegetTimeouts in class WindowWaiterTimeoutable,
Timeouts,
setTimeouts(org.netbeans.jemmy.Timeouts)public void setOutput(TestOut output)
setOutput in interface OutputablesetOutput in class Waiteroutput - Identify the streams or writers used for print output.Outputable,
TestOut,
getOutput()public TestOut getOutput()
getOutput in interface OutputablegetOutput in class WaiterOutputable,
TestOut,
setOutput(org.netbeans.jemmy.TestOut)
public Frame waitFrame(ComponentChooser ch,
int index)
throws InterruptedException
index+1'th Frame that meets the criteria
defined and applied by the ComonentChooser parameter to
show up.
ch - A component chooser used to define and apply the search criteria.index - The ordinal index of the Frame in the set of currently displayed
Frames. The first index is 0.
index+1'th Frame that shows
and that meets the search criteria. If fewer than
index+1 Frames show up in the allotted time period then
a null reference is returned.
TimeoutExpiredException
InterruptedExceptionWindowWaiter.actionProduced(Object)
public Frame waitFrame(ComponentChooser ch)
throws InterruptedException
ComponentChooser parameter to show up.
ch - A component chooser used to define and apply the search criteria.
null reference is returned.
TimeoutExpiredException
InterruptedExceptionWindowWaiter.actionProduced(Object)
public Frame waitFrame(String title,
boolean compareExactly,
boolean compareCaseSensitive,
int index)
throws InterruptedException
index+1'th Frame to show with a suitable title.
title - Frame title or subtitle.compareExactly - If true and the search is case sensitive, then a
match occurs when the title argument is a substring of a
Frame title. If false and the search is case sensitive,
then the title argument and the Frame title must be the same.
If true and the search is case insensitive, then a match occurs
when the title argument is a substring of the Frame title after
changing both to upper case. If false and the search is case
insensitive, then a match occurs when the title argument is a
substring of the Frame title after changing both to upper case.compareCaseSensitive - If true the search is case sensitive;
otherwise, the search is case insensitive.index - The ordinal index of the Frame in the set of currently displayed
Frames with the proper window ownership and a suitable title. The
first index is 0.
index+1'th Frame to show and that has a
suitable title. If no such Frame can be found within the time period
allotted, a null reference is returned.
TimeoutExpiredException
InterruptedExceptionWindowWaiter.actionProduced(Object)
public Frame waitFrame(String title,
boolean compareExactly,
boolean compareCaseSensitive)
throws InterruptedException
title - Frame title or subtitle.compareExactly - If true and the search is case sensitive, then a
match occurs when the title argument is a substring of a
Frame title. If false and the search is case sensitive,
then the title argument and the Frame title must be the same.
If true and the search is case insensitive, then a match occurs
when the title argument is a substring of the Frame title after
changing both to upper case. If false and the search is case
insensitive, then a match occurs when the title argument is a
substring of the Frame title after changing both to upper case.compareCaseSensitive - If true the search is case sensitive;
otherwise, the search is case insensitive.
null reference is returned.
TimeoutExpiredException
InterruptedExceptionWindowWaiter.actionProduced(Object)protected String getWaitingStartedMessage()
Waiter
getWaitingStartedMessage in class WindowWaiterWaiter.getWaitingStartedMessage()protected String getTimeoutExpiredMessage(long timeSpent)
getTimeoutExpiredMessage in class WindowWaitertimeSpent - Time spent for waiting
Waiter.getTimeoutExpiredMessage(long)
protected String getActionProducedMessage(long timeSpent,
Object result)
getActionProducedMessage in class WindowWaitertimeSpent - Time spent for waiting.result - A message string.
Waiter.getActionProducedMessage(long, Object)protected String getGoldenWaitingStartedMessage()
Waiter
getGoldenWaitingStartedMessage in class WindowWaiterWaiter.getGoldenWaitingStartedMessage()protected String getGoldenTimeoutExpiredMessage()
Waiter
getGoldenTimeoutExpiredMessage in class WindowWaiterWaiter.getGoldenTimeoutExpiredMessage()protected String getGoldenActionProducedMessage()
Waiter
getGoldenActionProducedMessage in class WindowWaiterWaiter.getGoldenActionProducedMessage()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||