| java.lang.Object org.netbeans.jemmy.Waiter org.netbeans.jemmy.WindowWaiter org.netbeans.jemmy.FrameWaiter
FrameWaiter | public class FrameWaiter extends WindowWaiter implements Timeoutable,Outputable(Code) | | 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.
See Also: org.netbeans.jemmy.Timeouts author: Alexandre Iline (alexandre.iline@sun.com) |
Method Summary | |
protected String | getActionProducedMessage(long timeSpent, Object result) Overrides WindowWaiter.getActionProducedMessage.
Returns the action produced message value.
Parameters: timeSpent - Time spent for waiting. Parameters: result - A message string. | public static Frame | getFrame(ComponentChooser cc) Searches for a Frame.
Search among the currently showing Frames for one that meets the search
criteria applied by the ComponentChooser parameter.
Parameters: cc - A component chooser used to define and apply the search criteria. | public static Frame | getFrame(ComponentChooser cc, int index) Searches for a Frame.
The search proceeds among the currently showing Frames for the
index+1 'th Frame that meets the criteria defined and
applied by the ComonentChooser parameter.
Parameters: cc - A component chooser used to define and apply the search criteria. Parameters: index - The ordinal index of the Frame in the set of currently displayedFrames. | public static Frame | getFrame(String title, boolean ce, boolean cc) Searches for a Frame by title.
The search proceeds among the currently showing Frames for the first
with a suitable title.
Parameters: title - Frame title or subtitle. Parameters: ce - If true and the search is case sensitive, then amatch occurs when the title argument is a substring of aFrame title. | public static Frame | getFrame(String title, boolean ce, boolean cc, int index) Searches for a Frame by title.
The search is for the index+1 'th Frame among the currently
showing Frames that possess a suitable title.
Parameters: title - Frame title or subtitle. Parameters: ce - If true and the search is case sensitive, then amatch occurs when the title argument is a substring of aFrame title. | protected String | getGoldenActionProducedMessage() | protected String | getGoldenTimeoutExpiredMessage() | protected String | getGoldenWaitingStartedMessage() | public TestOut | getOutput() Returns print output streams or writers. | protected String | getTimeoutExpiredMessage(long timeSpent) Overrides WindowWaiter.getTimeoutExpiredMessage. | public Timeouts | getTimeouts() Return current timeouts. | protected String | getWaitingStartedMessage() | public void | setOutput(TestOut output) Defines print output streams or writers. | public void | setTimeouts(Timeouts timeouts) Defines current timeouts. | public Frame | waitFrame(ComponentChooser ch, int index) Waits for a Frame to show.
Wait for the index+1 'th Frame that meets the criteria
defined and applied by the ComonentChooser parameter to
show up.
Parameters: ch - A component chooser used to define and apply the search criteria. Parameters: index - The ordinal index of the Frame in the set of currently displayedFrames. | public Frame | waitFrame(ComponentChooser ch) Waits for a Frame to show.
Wait for a Frame that meets the search criteria applied by the
ComponentChooser parameter to show up.
Parameters: ch - A component chooser used to define and apply the search criteria. a reference to the first Frame that shows and thatmeets the search criteria. | public Frame | waitFrame(String title, boolean compareExactly, boolean compareCaseSensitive, int index) Waits for a Frame to show.
Wait for the index+1 'th Frame to show with a suitable title.
Parameters: title - Frame title or subtitle. Parameters: compareExactly - If true and the search is case sensitive, then amatch occurs when the title argument is a substring of aFrame title. | public Frame | waitFrame(String title, boolean compareExactly, boolean compareCaseSensitive) Waits for a Frame to show.
Wait for the first Frame to show with a suitable title.
Parameters: title - Frame title or subtitle. Parameters: compareExactly - If true and the search is case sensitive, then amatch occurs when the title argument is a substring of aFrame title. |
FrameWaiter | public FrameWaiter()(Code) | | Constructor.
|
getActionProducedMessage | protected String getActionProducedMessage(long timeSpent, Object result)(Code) | | Overrides WindowWaiter.getActionProducedMessage.
Returns the action produced message value.
Parameters: timeSpent - Time spent for waiting. Parameters: result - A message string. a message tring See Also: Waiter.getActionProducedMessage(longObject) |
getFrame | public static Frame getFrame(ComponentChooser cc)(Code) | | Searches for a Frame.
Search among the currently showing Frames for one that meets the search
criteria applied by the ComponentChooser parameter.
Parameters: cc - A component chooser used to define and apply the search criteria. a reference to the first Frame that is showing and thatmeets the search criteria. If no such Frame can be found, anull reference is returned. |
getFrame | public static Frame getFrame(ComponentChooser cc, int index)(Code) | | Searches for a Frame.
The search proceeds among the currently showing Frames for the
index+1 'th Frame that meets the criteria defined and
applied by the ComonentChooser parameter.
Parameters: cc - A component chooser used to define and apply the search criteria. Parameters: index - The ordinal index of the Frame in the set of currently displayedFrames. The first index is 0. a reference to the index+1 'th Frame that is showingand that meets the search criteria. If there are fewer thanindex+1 Frames, a null reference is returned. |
getFrame | public static Frame getFrame(String title, boolean ce, boolean cc)(Code) | | Searches for a Frame by title.
The search proceeds among the currently showing Frames for the first
with a suitable title.
Parameters: title - Frame title or subtitle. Parameters: ce - If true and the search is case sensitive, then amatch occurs when the title argument is a substring of aFrame 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 occurswhen the title argument is a substring of the Frame title afterchanging both to upper case. If false and the search is caseinsensitive, then a match occurs when the title argument is asubstring of the Frame title after changing both to upper case. Parameters: cc - If true the search is case sensitive; otherwise, thesearch is case insensitive. a reference to the first Frame that is showing and that has asuitable title. If no such Frame can be found, a null reference is returned. |
getFrame | public static Frame getFrame(String title, boolean ce, boolean cc, int index)(Code) | | Searches for a Frame by title.
The search is for the index+1 'th Frame among the currently
showing Frames that possess a suitable title.
Parameters: title - Frame title or subtitle. Parameters: ce - If true and the search is case sensitive, then amatch occurs when the title argument is a substring of aFrame 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 occurswhen the title argument is a substring of the Frame title afterchanging both to upper case. If false and the search is caseinsensitive, then a match occurs when the title argument is asubstring of the Frame title after changing both to upper case. Parameters: cc - If true the search is case sensitive; otherwise, thesearch is case insensitive. Parameters: index - The ordinal index of the Frame in the set of currently displayedFrames. The first index is 0. a reference to the index+1 'th Frame that is showingand that has a suitable title. If there are fewer thanindex+1 Frames, a null reference is returned. |
getTimeoutExpiredMessage | protected String getTimeoutExpiredMessage(long timeSpent)(Code) | | Overrides WindowWaiter.getTimeoutExpiredMessage.
Returns the timeout expired message value.
Parameters: timeSpent - Time spent for waiting a message tring See Also: Waiter.getTimeoutExpiredMessage(long) |
waitFrame | public Frame waitFrame(ComponentChooser ch, int index) throws InterruptedException(Code) | | Waits for a Frame to show.
Wait for the index+1 'th Frame that meets the criteria
defined and applied by the ComonentChooser parameter to
show up.
Parameters: ch - A component chooser used to define and apply the search criteria. Parameters: index - The ordinal index of the Frame in the set of currently displayedFrames. The first index is 0. a reference to the index+1 'th Frame that showsand that meets the search criteria. If fewer thanindex+1 Frames show up in the allotted time period thena null reference is returned. throws: TimeoutExpiredException - See Also: org.netbeans.jemmy.WindowWaiter.actionProduced(Object) exception: InterruptedException - |
waitFrame | public Frame waitFrame(String title, boolean compareExactly, boolean compareCaseSensitive, int index) throws InterruptedException(Code) | | Waits for a Frame to show.
Wait for the index+1 'th Frame to show with a suitable title.
Parameters: title - Frame title or subtitle. Parameters: compareExactly - If true and the search is case sensitive, then amatch occurs when the title argument is a substring of aFrame 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 occurswhen the title argument is a substring of the Frame title afterchanging both to upper case. If false and the search is caseinsensitive, then a match occurs when the title argument is asubstring of the Frame title after changing both to upper case. Parameters: compareCaseSensitive - If true the search is case sensitive;otherwise, the search is case insensitive. Parameters: index - The ordinal index of the Frame in the set of currently displayedFrames with the proper window ownership and a suitable title. Thefirst index is 0. a reference to the index+1 'th Frame to show and that has asuitable title. If no such Frame can be found within the time periodallotted, a null reference is returned. throws: TimeoutExpiredException - See Also: org.netbeans.jemmy.WindowWaiter.actionProduced(Object) exception: InterruptedException - |
waitFrame | public Frame waitFrame(String title, boolean compareExactly, boolean compareCaseSensitive) throws InterruptedException(Code) | | Waits for a Frame to show.
Wait for the first Frame to show with a suitable title.
Parameters: title - Frame title or subtitle. Parameters: compareExactly - If true and the search is case sensitive, then amatch occurs when the title argument is a substring of aFrame 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 occurswhen the title argument is a substring of the Frame title afterchanging both to upper case. If false and the search is caseinsensitive, then a match occurs when the title argument is asubstring of the Frame title after changing both to upper case. Parameters: compareCaseSensitive - If true the search is case sensitive;otherwise, the search is case insensitive. a reference to the first Frame to show and that has asuitable title. If no such Frame can be found within the time periodallotted, a null reference is returned. throws: TimeoutExpiredException - See Also: org.netbeans.jemmy.WindowWaiter.actionProduced(Object) exception: InterruptedException - |
|
|