| java.lang.Object org.netbeans.jemmy.Waiter org.netbeans.jemmy.WindowWaiter org.netbeans.jemmy.DialogWaiter
DialogWaiter | public class DialogWaiter extends WindowWaiter implements Timeoutable,Outputable(Code) | | A DialogWaiter is a utility class used to look or wait for Dialogs.
It contains methods to search for a Dialog among the currently
showing Dialogs as well as methods that wait for a Diaog to show
within an allotted time period.
Searches and waits can either involve search criteria applied by a
ComponentChooser instance or a search criteria based on the Dialog
title. Searches and waits can both be restricted to dialogs owned
by a given window.
Timeouts used:
DialogWaiter.WaitDialogTimeout - time to wait dialog displayed
DialogWaiter.AfterDialogTimeout - time to sleep after dialog has been dispayed
See Also: org.netbeans.jemmy.Timeouts author: Alexandre Iline (alexandre.iline@sun.com) |
Method Summary | |
protected String | getActionProducedMessage(long spendedTime, Object result) Overrides WindowWaiter.getActionProducedMessage. | public static Dialog | getDialog(ComponentChooser cc) Searches for a dialog.
Search among the currently showing dialogs 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 Dialog | getDialog(ComponentChooser cc, int index) Searches for a dialog.
The search proceeds among the currently showing dialogs for the
index+1 'th dialog 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 dialog in the set of currently displayeddialogs. | public static Dialog | getDialog(String title, boolean ce, boolean cc) Searches for a dialog by title.
The search proceeds among the currently showing dialogs for the first
with a suitable title.
Parameters: title - Dialog title or subtitle. Parameters: ce - If true and the search is case sensitive, then amatch occurs when the title argument is a substring of adialog title. | public static Dialog | getDialog(String title, boolean ce, boolean cc, int index) Searches for a dialog by title.
The search is for the index+1 'th dialog among the currently
showing dialogs that possess a suitable title.
Parameters: title - Dialog title or subtitle. Parameters: ce - If true and the search is case sensitive, then amatch occurs when the title argument is a substring of adialog title. | public static Dialog | getDialog(Window owner, ComponentChooser cc) Searches for a dialog.
Search among the currently showing dialogs for the first that is both
owned by the java.awt.Window owner and that
meets the search criteria applied by the ComponentChooser
parameter.
Parameters: owner - The owner window of the dialogs to be searched. Parameters: cc - A component chooser used to define and apply the search criteria. | public static Dialog | getDialog(Window owner, ComponentChooser cc, int index) Searches for a dialog. | public static Dialog | getDialog(Window owner, String title, boolean ce, boolean cc) Searches for a dialog by title.
The search proceeds among the currently showing dialogs that are owned
by the java.awt.Window owner for the first with
a suitable title.
Parameters: owner - A window - owner of a dialods to be checked. Parameters: title - Dialog title or subtitle. Parameters: ce - If true and the search is case sensitive, then amatch occurs when the title argument is a substring of adialog title. | public static Dialog | getDialog(Window owner, String title, boolean ce, boolean cc, int index) Searches for a dialog by title.
The search is for the index+1 'th dialog among the currently
showing dialogs that are owned by the java.awt.Window
owner and that have a suitable title.
Parameters: owner - ?title? Dialog title or subtitle. Parameters: title - ?ce? If true and the search is case sensitive, then amatch occurs when the title argument is a substring of adialog title. | protected String | getGoldenActionProducedMessage() | protected String | getGoldenTimeoutExpiredMessage() | protected String | getGoldenWaitingStartedMessage() | public TestOut | getOutput() Returns print output streams or writers. | protected String | getTimeoutExpiredMessage(long spendedTime) 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 Dialog | waitDialog(ComponentChooser ch, int index) Waits for a dialog to show.
Wait for the index+1 'th dialog 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 dialog in the set of currently displayeddialogs. | public Dialog | waitDialog(ComponentChooser ch) Waits for a dialog to show.
Wait for a dialog 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 dialog that shows and thatmeets the search criteria. | public Dialog | waitDialog(String title, boolean compareExactly, boolean compareCaseSensitive, int index) Waits for a dialog to show.
Wait for the index+1 'th dialog to show with a suitable title.
Parameters: title - Dialog title or subtitle. Parameters: compareExactly - If true and the search is case sensitive, then amatch occurs when the title argument is a substring of adialog title. | public Dialog | waitDialog(String title, boolean compareExactly, boolean compareCaseSensitive) Waits for a dialog to show.
Wait for the first dialog to show with a suitable title.
Parameters: title - Dialog title or subtitle. Parameters: compareExactly - If true and the search is case sensitive, then amatch occurs when the title argument is a substring of adialog title. | public Dialog | waitDialog(Window owner, ComponentChooser ch, int index) Waits for a dialog to show.
Wait for the index+1 'th dialog to show that is both owned by the
java.awt.Window owner and that meets the
criteria defined and applied by the ComponentChooser parameter.
Parameters: owner - The owner window of all the dialogs to be searched. Parameters: ch - A component chooser used to define and apply the search criteria. Parameters: index - The ordinal index of the dialog in the set of currently displayeddialogs with the proper window ownership and a suitable title. | public Dialog | waitDialog(Window owner, ComponentChooser ch) Waits for a dialog to show. | public Dialog | waitDialog(Window owner, String title, boolean compareExactly, boolean compareCaseSensitive, int index) Waits for a dialog to show.
Wait for the index+1 'th dialog to show with the proper owner
and a suitable title.
Parameters: owner - The owner window of all the dialogs to be searched. Parameters: title - Dialog title or subtitle. Parameters: compareExactly - If true and the search is case sensitive, then amatch occurs when the title argument is a substring of adialog title. | public Dialog | waitDialog(Window owner, String title, boolean compareExactly, boolean compareCaseSensitive) Waits for a dialog to show.
Wait for the first dialog to show with the proper owner and a suitable title.
See Also: org.netbeans.jemmy.WindowWaiter.actionProduced(Object) Parameters: owner - The owner window of all the dialogs to be searched. Parameters: title - Dialog title or subtitle. Parameters: compareExactly - If true and the search is case sensitive, then amatch occurs when the title argument is a substring of adialog title. |
DialogWaiter | public DialogWaiter()(Code) | | Constructor.
|
getDialog | public static Dialog getDialog(ComponentChooser cc)(Code) | | Searches for a dialog.
Search among the currently showing dialogs 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 dialog that is showing and thatmeets the search criteria. If no such dialog can be found, anull reference is returned. |
getDialog | public static Dialog getDialog(ComponentChooser cc, int index)(Code) | | Searches for a dialog.
The search proceeds among the currently showing dialogs for the
index+1 'th dialog 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 dialog in the set of currently displayeddialogs. The first index is 0. a reference to the index+1 'th dialog that is showingand that meets the search criteria. If there are fewer thanindex+1 dialogs, a null reference is returned. |
getDialog | public static Dialog getDialog(String title, boolean ce, boolean cc)(Code) | | Searches for a dialog by title.
The search proceeds among the currently showing dialogs for the first
with a suitable title.
Parameters: title - Dialog title or subtitle. Parameters: ce - If true and the search is case sensitive, then amatch occurs when the title argument is a substring of adialog title. If false and the search is case sensitive,then the title argument and the dialog 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 dialog 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 dialog 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 dialog that is showing and that has asuitable title. If no such dialog can be found, a null reference is returned. |
getDialog | public static Dialog getDialog(String title, boolean ce, boolean cc, int index)(Code) | | Searches for a dialog by title.
The search is for the index+1 'th dialog among the currently
showing dialogs that possess a suitable title.
Parameters: title - Dialog title or subtitle. Parameters: ce - If true and the search is case sensitive, then amatch occurs when the title argument is a substring of adialog title. If false and the search is case sensitive,then the title argument and the dialog 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 dialog 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 dialog title after changing both to upper case. Parameters: cc - If true the search is case sensitive; otherwise, thesearch is case insensitive. Parameters: index - Ordinal index between appropriate dialogs a reference to the index+1 'th dialog that is showingand that has a suitable title. If there are fewer thanindex+1 dialogs, a null reference is returned. |
getDialog | public static Dialog getDialog(Window owner, ComponentChooser cc)(Code) | | Searches for a dialog.
Search among the currently showing dialogs for the first that is both
owned by the java.awt.Window owner and that
meets the search criteria applied by the ComponentChooser
parameter.
Parameters: owner - The owner window of the dialogs to be searched. Parameters: cc - A component chooser used to define and apply the search criteria. a reference to the first dialog that is showing, has a properowner window, and that meets the search criteria. If no such dialogcan be found, a null reference is returned. |
getDialog | public static Dialog getDialog(Window owner, ComponentChooser cc, int index)(Code) | | Searches for a dialog.
The search proceeds among the currently showing dialogs
for the index+1 'th dialog that is both owned by the
java.awt.Window owner and that meets the
criteria defined and applied by the ComponentChooser parameter.
Parameters: owner - The owner window of all the dialogs to be searched. Parameters: cc - A component chooser used to define and apply the search criteria. Parameters: index - Ordinal index between appropriate dialogs a reference to the index+1 'th dialog that is showing,has the proper window ownership, and that meets the search criteria.If there are fewer than index+1 dialogs, a null reference is returned. |
getDialog | public static Dialog getDialog(Window owner, String title, boolean ce, boolean cc)(Code) | | Searches for a dialog by title.
The search proceeds among the currently showing dialogs that are owned
by the java.awt.Window owner for the first with
a suitable title.
Parameters: owner - A window - owner of a dialods to be checked. Parameters: title - Dialog title or subtitle. Parameters: ce - If true and the search is case sensitive, then amatch occurs when the title argument is a substring of adialog title. If false and the search is case sensitive,then the title argument and the dialog 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 dialog 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 dialog 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 dialog that is showing, has the properwindow ownership, and a suitable title. If no such dialog can be found,a null reference is returned. |
getDialog | public static Dialog getDialog(Window owner, String title, boolean ce, boolean cc, int index)(Code) | | Searches for a dialog by title.
The search is for the index+1 'th dialog among the currently
showing dialogs that are owned by the java.awt.Window
owner and that have a suitable title.
Parameters: owner - ?title? Dialog title or subtitle. Parameters: title - ?ce? If true and the search is case sensitive, then amatch occurs when the title argument is a substring of adialog title. If false and the search is case sensitive,then the title argument and the dialog 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 dialog 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 dialog title after changing both to upper case. Parameters: ce - ?cc? If true the search is case sensitive; otherwise, thesearch is case insensitive. Parameters: cc - ?index? The ordinal index of the dialog in the set of currently displayeddialogs with the proper window ownership and a suitable title. Thefirst index is 0. Parameters: index - Ordinal index between appropriate dialogs a reference to the index+1 'th dialog that is showing, hasthe proper window ownership, and a suitable title. If there are fewer thanindex+1 dialogs, a null reference is returned. |
waitDialog | public Dialog waitDialog(ComponentChooser ch, int index) throws InterruptedException(Code) | | Waits for a dialog to show.
Wait for the index+1 'th dialog 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 dialog in the set of currently displayeddialogs. The first index is 0. a reference to the index+1 'th dialog that showsand that meets the search criteria. If fewer thanindex+1 dialogs show up in the allotted time period thena null reference is returned. throws: TimeoutExpiredException - See Also: org.netbeans.jemmy.WindowWaiter.actionProduced(Object) exception: InterruptedException - |
waitDialog | public Dialog waitDialog(String title, boolean compareExactly, boolean compareCaseSensitive, int index) throws InterruptedException(Code) | | Waits for a dialog to show.
Wait for the index+1 'th dialog to show with a suitable title.
Parameters: title - Dialog title or subtitle. Parameters: compareExactly - If true and the search is case sensitive, then amatch occurs when the title argument is a substring of adialog title. If false and the search is case sensitive,then the title argument and the dialog 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 dialog 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 dialog 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 dialog in the set of currently displayeddialogs with the proper window ownership and a suitable title. Thefirst index is 0. a reference to the index+1 'th dialog to show and that has asuitable title. If no such dialog can be found within the time periodallotted, a null reference is returned. throws: TimeoutExpiredException - See Also: org.netbeans.jemmy.WindowWaiter.actionProduced(Object) exception: InterruptedException - |
waitDialog | public Dialog waitDialog(String title, boolean compareExactly, boolean compareCaseSensitive) throws InterruptedException(Code) | | Waits for a dialog to show.
Wait for the first dialog to show with a suitable title.
Parameters: title - Dialog title or subtitle. Parameters: compareExactly - If true and the search is case sensitive, then amatch occurs when the title argument is a substring of adialog title. If false and the search is case sensitive,then the title argument and the dialog 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 dialog 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 dialog 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 dialog to show and that has asuitable title. If no such dialog can be found within the time periodallotted, a null reference is returned. throws: TimeoutExpiredException - See Also: org.netbeans.jemmy.WindowWaiter.actionProduced(Object) exception: InterruptedException - |
waitDialog | public Dialog waitDialog(Window owner, ComponentChooser ch, int index) throws InterruptedException(Code) | | Waits for a dialog to show.
Wait for the index+1 'th dialog to show that is both owned by the
java.awt.Window owner and that meets the
criteria defined and applied by the ComponentChooser parameter.
Parameters: owner - The owner window of all the dialogs to be searched. Parameters: ch - A component chooser used to define and apply the search criteria. Parameters: index - The ordinal index of the dialog in the set of currently displayeddialogs with the proper window ownership and a suitable title. The firstindex is 0. a reference to the index+1 'th dialog to show thathas the proper window ownership, and that meets the search criteria.If there are fewer than index+1 dialogs, a null reference is returned. throws: TimeoutExpiredException - See Also: org.netbeans.jemmy.WindowWaiter.actionProduced(Object) exception: InterruptedException - |
waitDialog | public Dialog waitDialog(Window owner, String title, boolean compareExactly, boolean compareCaseSensitive, int index) throws InterruptedException(Code) | | Waits for a dialog to show.
Wait for the index+1 'th dialog to show with the proper owner
and a suitable title.
Parameters: owner - The owner window of all the dialogs to be searched. Parameters: title - Dialog title or subtitle. Parameters: compareExactly - If true and the search is case sensitive, then amatch occurs when the title argument is a substring of adialog title. If false and the search is case sensitive,then the title argument and the dialog 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 dialog 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 dialog title after changing both to upper case. Parameters: compareCaseSensitive - If true the search is case sensitive;otherwise, the search is case insensitive. Parameters: index - Ordinal index between appropriate dialogs a reference to the index+1 'th dialog to show that hasboth the proper owner window and a suitable title. If no such dialog can be foundwithin the time period allotted, a null reference is returned. throws: TimeoutExpiredException - See Also: org.netbeans.jemmy.WindowWaiter.actionProduced(Object) exception: InterruptedException - |
waitDialog | public Dialog waitDialog(Window owner, String title, boolean compareExactly, boolean compareCaseSensitive) throws InterruptedException(Code) | | Waits for a dialog to show.
Wait for the first dialog to show with the proper owner and a suitable title.
See Also: org.netbeans.jemmy.WindowWaiter.actionProduced(Object) Parameters: owner - The owner window of all the dialogs to be searched. Parameters: title - Dialog title or subtitle. Parameters: compareExactly - If true and the search is case sensitive, then amatch occurs when the title argument is a substring of adialog title. If false and the search is case sensitive,then the title argument and the dialog 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 dialog 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 dialog 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 dialog to show and that has both the properowner and a suitable title. If no such dialog can be found within the time periodallotted, a null reference is returned. throws: TimeoutExpiredException - exception: InterruptedException - |
|
|