| java.lang.Object abbot.tester.Robot abbot.tester.ComponentTester
All known Subclasses: abbot.tester.TextComponentTester, abbot.tester.CheckboxTester, abbot.tester.ListTester, abbot.tester.extensions.DummyTester, abbot.tester.ButtonTester, abbot.tester.extensions.ArrowButtonTester, abbot.tester.ChoiceTester, abbot.tester.ContainerTester,
ComponentTester | public class ComponentTester extends Robot (Code) | | Provides basic programmatic operation of a
Component and related
UI objects such as windows, menus and menu bars throuh action methods.
Also provides some useful assertions about properties of a
Component .
There are two sets of event-generating methods. The internal, protected
methods inherited from
abbot.tester.Robot abbot.tester.Robot are
for normal programmatic use within derived Tester classes. No event queue
synchronization should be performed except when modifying a component for
which results are required for the action itself.
The public actionXXX functions are meant to be invoked from a
script or directly from a hand-written test. These actions are
distinguished by name, number of arguments, and by argument type. The
actionX methods will be synchronized with the event dispatch thread when
invoked, so you should only do synchronization with waitForIdle when you
depend on the results of a particular event prior to sending the next one
(e.g. scrolling a table cell into view before selecting it).
All public action methods should ensure that the actions they
trigger are finished on return, or will be finished before any subsequent
actions are requested.
Action methods generally represent user-driven actions such
as menu selection, table selection, popup menus, etc. All actions should
have the following signature:
public void actionSpinMeRoundLikeARecord(Component c, ...);
public void actionPinchMe(Component c, ComponentLocation loc);
It is essential that the argument is of type
Component ; if you use
a more-derived class, then the actual invocation becomes ambiguous since
method parsing doesn't attempt to determine which identically-named method
is the most-derived.
The
ComponentLocation abstraction allows all derived tester
classes to inherit click, popup menu, and drag variants without having to
explicitly define new methods for component-specific substructures. The
new class need only define the
ComponentTester.parseLocation(String) method,
which should return a location specific to the component in question.
Assertions are either independent of any component (and should be
implemented in this class), or take a component as the first argument, and
perform some check on that component. All assertions should have one of
the following signatures:
public boolean assertMyself(...);
public boolean assertBorderIsAtrociouslyUgly(Component c, ...);
Note that these assertions do not throw exceptions but rather return a
boolean value indicating success or failure. Normally these
assertions will be wrapped by an abbot.script.Assert step if you want to
cause a test failure, or you can manually throw the proper failure
exception if the method returns false.
Property checks may also be implemented in cases where the component
"property" might not be readily available or easily comparable, e.g.
see
abbot.tester.JPopupMenuTester.getMenuLabels(Component) .
public Object getHairpiece(Component c);
public boolean isRighteouslyIndignant(Component c);
Any non-property methods with the property signature, should be added to
the
ComponentTester.IGNORED_METHODS set, since property-like methods are scanned
dynamically to populate the
abbot.editor.ScriptEditor editor 's
action menus.
Extending ComponentTester
Following are the steps required to implement a Tester object for a custom
class.
Create the Tester Class
Derive from this class to implement actions and assertions specific to
a given component class. Testers for any classes found in the JRE
(i.e. in the
java.awt or
javax.swing packages) should be
in the
abbot.tester abbot.tester package. Extensions (testers for
any Component subclasses not found in the JRE) must be in the
abbot.tester.extensions package and be
named the name of the Component subclass followed by "Tester".
For example, the
javax.swing.JButton javax.swing.JButton tester
class is
JButtonTester abbot.tester.JButtonTester , and a tester
for org.me.PR0NViewer would be
abbot.tester.extensions.PR0NViewerTester .
Add Action Methods
Add action methods which effect user actions.
See the section on naming conventions below.
Add Assertion Methods
Add assert methods to access attributes not readily available
as properties
Add Substructure Support
Add a corresponding ComponentLocation implementation to
handle any substructure present in your Component .
See
ComponentLocation for details.
Add Substructure-handling Methods
-
ComponentTester.parseLocation(String)
Convert the given String into an instance of
ComponentLocation specific to your Tester. Here is an example
implementation from
JListTester :
public ComponentLocation parseLocation(String encoded) {
return new JListLocation().parse(encoded);
}
-
ComponentTester.getLocation(Component,Point)
Use the given Point to create a
ComponentLocation instance appropriate for the Component substructure
available at that location. For example, on a
javax.swing.JList ,
you would return a
JListLocation based on the
stringified value at that location, the row/index at that
location, or the raw Point ,
in order of preference. If a stringified value is unavailable,
fall back to an indexed position; if that is not possible (if, for
instance, the location is outside the list contents), return a
ComponentLocation based on the raw Point .
Set Editor Properties
Add-on tester classes should set the following system properties so that
the actions provided by their tester can be properly displayed in the
script editor. For an action actionWiggle provided by class
abbot.tester.extensions.PR0NViewerTester , the following
properties should be defined:
actionWiggle.menu short name for Insert menu
actionWiggle.desc short description (optional)
actionWiggle.icon icon for the action (optional)
PR0NViewerTester.actionWiggle.args javadoc-style
description of method, displayed when asking the user for its arguments
Since these properties are global, if your Tester class defines a method
which is also defined by another Tester class, you must supply the class
name as a prefix to the property.
Method Naming Conventions
Action methods should be named according to the human-centric action that
is being performed if at all possible. For example, use
actionSelectRow in a List rather than
actionSelectIndex . If there's no common usage, or if the
usage is too vague or diverse, use the specific terms used in code.
For example,
JScrollBarTester uses
JScrollBarTester.actionScrollUnitUp(Component) actionScrollUnitUp() and
JScrollBarTester.actionScrollBlockUp(Component) actionScrollBlockUp() ;
since there is no common language usage for these
concepts (line and page exist, but are not appropriate if what is scrolled
is not text).
When naming a selection method, include the logical substructure target of
the selection in the name (e.g.
JTableTester.actionSelectCell(ComponentJTableLocation) JTableTester.actionSelectCell()),
since some components may have more than one type of selectable item
within them.
|
Field Summary | |
protected static Set | IGNORED_METHODS Add any method names here which should not show up in a
dynamically generated list of property methods. |
Method Summary | |
public void | actionClick(Component comp) Click on the center of the component. | public void | actionClick(Component c, ComponentLocation loc) Click on the component at the given location. | public void | actionClick(Component c, ComponentLocation loc, int buttons) Click on the component at the given location with the given
modifiers. | public void | actionClick(Component c, ComponentLocation loc, int buttons, int count) Click on the component at the given location, with the given
modifiers and click count. | public void | actionClick(Component comp, int x, int y) Click on the component at the given location (mouse button 1). | public void | actionClick(Component comp, int x, int y, int buttons) Click on the component at the given location. | public void | actionClick(Component comp, int x, int y, int buttons, int count) Click on the component at the given location, specifying buttons and
the number of clicks. | public void | actionDelay(int ms) Delay the given number of ms. | public void | actionDrag(Component dragSource, ComponentLocation loc) Perform a drag action. | public void | actionDrag(Component dragSource) Perform a drag action. | public void | actionDrag(Component dragSource, ComponentLocation loc, String buttons) Perform a drag action with the given modifiers. | public void | actionDrag(Component dragSource, ComponentLocation loc, int buttons) Perform a drag action with the given modifiers. | public void | actionDrag(Component dragSource, int sx, int sy) Perform a drag action. | public void | actionDrag(Component dragSource, int sx, int sy, String buttons) Perform a drag action. | public void | actionDragOver(Component target) Drag the current dragged object over the given component. | public void | actionDragOver(Component target, ComponentLocation where) Drag the current dragged object over the given target/location. | public void | actionDrop(Component dropTarget) Perform a basic drop action (implicitly causing preceding mouse
drag motion). | public void | actionDrop(Component dropTarget, ComponentLocation loc) Perform a basic drop action (implicitly causing preceding mouse
drag motion). | public void | actionDrop(Component dropTarget, int x, int y) Perform a basic drop action (implicitly causing preceding mouse
drag motion). | public void | actionFocus(Component comp) Set the focus on to the given component. | public void | actionKeyPress(Component comp, int keyCode) Send a key press event for the given virtual key code to the given
Component. | public void | actionKeyPress(int keyCode) Generate a key press event for the given virtual key code. | public void | actionKeyRelease(Component comp, int keyCode) Generate a key release event sent to the given component. | public void | actionKeyRelease(int keyCode) Generate a key release event. | public void | actionKeyString(Component c, String string) Send events required to generate the given string on the given
component. | public void | actionKeyString(String string) Send events required to generate the given string. | public void | actionKeyStroke(Component c, int keyCode) Send the given keystroke, which must be the KeyEvent field name of a
KeyEvent VK_ constant to the program. | public void | actionKeyStroke(int keyCode) Send the given keystroke, which must be the KeyEvent field name of a
KeyEvent VK_ constant. | public void | actionKeyStroke(Component c, int keyCode, int modifiers) Send the given keystroke, which must be the KeyEvent field name of a
KeyEvent VK_ constant to the program. | public void | actionKeyStroke(int keyCode, int modifiers) Send the given keystroke, which must be the KeyEvent field name of a
KeyEvent VK_ constant to the program. | public void | actionMouseMove(Component comp, ComponentLocation loc) Move the mouse/pointer to the given location. | public void | actionMousePress(Component comp, ComponentLocation loc) Press mouse button 1 at the given location. | public void | actionMousePress(Component comp, ComponentLocation loc, int mask) Press mouse buttons corresponding to the given mask at the given
location. | public void | actionMouseRelease() Release any currently held mouse buttons. | public void | actionSelectAWTMenuItem(Frame menuFrame, String path) Selects an AWT menu item (
java.awt.MenuItem ) and returns when
the invocation has triggered (though not necessarily completed). | public void | actionSelectAWTMenuItemByLabel(Frame menuFrame, String path) | public void | actionSelectAWTPopupMenuItem(Component invoker, String path) Selects an AWT menu item and returns when the invocation has triggered
(though not necessarily completed). | public void | actionSelectAWTPopupMenuItemByLabel(Component invoker, String path) | public void | actionSelectMenuItem(Component item) Select the given menu item. | public void | actionSelectMenuItem(Component sameWindow, String path) Select the given menu item, given its path and a component on the same
window. | public void | actionSelectPopupMenuItem(Component invoker, String path) Pop up a menu at the center of the given component and
select the given item. | public void | actionSelectPopupMenuItem(Component invoker, ComponentLocation loc, String path) Pop up a menu at the given location on the given component and
select the given item. | public void | actionSelectPopupMenuItem(Component invoker, int x, int y, String path) Pop up a menu at the given coordinates on the given component and
select the given item. | public void | actionSetModifiers(int mask, boolean pressed) Set the state of the given modifier keys. | public void | actionShowPopupMenu(Component invoker) Pop up a menu in the center of the given component. | public void | actionShowPopupMenu(Component invoker, ComponentLocation loc) Pop up a menu in the center of the given component. | public void | actionShowPopupMenu(Component invoker, int x, int y) Pop up a menu at the given location on the given component. | public void | actionWaitForIdle() Wait for an idle AWT event queue. | public boolean | assertComponentShowing(ComponentReference ref) Return whether the Component represented by the given
ComponentReference is available. | public boolean | assertFrameShowing(Hierarchy h, String id) Returns whether a Window corresponding to the given String is
showing. | public boolean | assertFrameShowing(String id) Returns whether a Window corresponding to the given String is
showing. | public boolean | assertImage(Component comp, java.io.File fileImage, boolean ignoreBorder) Return whether the component's contents matches the given image. | protected String | deriveAccessibleTag(AccessibleContext context) Derive a tag from the given accessible context if possible, or return
null. | public String | deriveTag(Component comp) Determine a component-specific identifier not already defined in other
component attributes. | public Method[] | getActions() Return a list of all actions defined by this class that don't depend
on a component argument. | public Method[] | getAssertMethods() Return a list of all assertions defined by this class that don't
depend on a component argument. | public Method[] | getComponentActions() Return a list of all actions defined by this class that require
a component argument. | public Method[] | getComponentAssertMethods() Return a list of all assertions defined by this class that require a
component argument. | public ComponentLocation | getLocation(Component c, Point where) Return a ComponentLocation for the given Point. | public Method[] | getPropertyMethods() Return an array of all property check methods defined by this class. | public static String | getTag(Component comp) Return a reasonable identifier for the given component. | public Class | getTestedClass(Class cls) Return the Component class that corresponds to this
ComponentTester
class. | public static ComponentTester | getTester(Component comp) Return a shared instance of the appropriate
ComponentTester for the given
Component .
This method is primarily used by the scripting system, since the
appropriate ComponentTester for a given
Component is not known a priori. | public static ComponentTester | getTester(Class componentClass) Return a shared instance of the corresponding
ComponentTester object for the given
Component class, chaining up the inheritance tree if no specific tester is found
for that class.
The abbot tester package is searched first, followed by the tester
extensions package.
This method is primarily used by the scripting system, since the
appropriate ComponentTester for a given Component is not
known a priori. | protected boolean | isCustom(Class c) Returns whether the given class is not a core JRE class. | final public boolean | isExtension() Return whether this tester is an extension. | public ComponentLocation | parseLocation(String encoded) Parse the String representation of a ComponentLocation into
the actual ComponentLocation object. | public static void | setTester(Class forClass, ComponentTester tester) Establish the given ComponentTester as the one to use for the given
class. | public static String | stripHTML(String str) Quick and dirty strip raw text from html, for getting the basic text
from html-formatted labels and buttons. | protected void | waitAction(String desc, Condition cond) Wait for the given condition, throwing an ActionFailedException if it
times out. | public void | waitForComponentShowing(ComponentReference ref) Wait for the Component represented by the given ComponentReference to
become available. | public void | waitForFrameShowing(Hierarchy h, String identifier) Convenience wait for a window to be displayed. | public void | waitForFrameShowing(String identifier) Convenience wait for a window to be displayed. |
IGNORED_METHODS | protected static Set IGNORED_METHODS(Code) | | Add any method names here which should not show up in a
dynamically generated list of property methods.
|
actionClick | public void actionClick(Component comp)(Code) | | Click on the center of the component.
|
actionClick | public void actionClick(Component c, ComponentLocation loc, int buttons)(Code) | | Click on the component at the given location with the given
modifiers.
|
actionClick | public void actionClick(Component c, ComponentLocation loc, int buttons, int count)(Code) | | Click on the component at the given location, with the given
modifiers and click count.
|
actionClick | public void actionClick(Component comp, int x, int y)(Code) | | Click on the component at the given location (mouse button 1).
|
actionDelay | public void actionDelay(int ms)(Code) | | Delay the given number of ms.
|
actionDrag | public void actionDrag(Component dragSource, ComponentLocation loc)(Code) | | Perform a drag action. Derived classes may provide more specific
identifiers for what is being dragged simply by deriving a new class
from ComponentLocation which identifies the appropriate substructure.
For instance, a
JTreeLocation might encapsulate the expansion
control location for the path [root, node A, child B].
|
actionDrag | public void actionDrag(Component dragSource)(Code) | | Perform a drag action. Grabs the center of the given component.
|
actionDrag | public void actionDrag(Component dragSource, ComponentLocation loc, int buttons)(Code) | | Perform a drag action with the given modifiers.
Parameters: dragSource - source of the drag Parameters: loc - identifies where on the given Component to begin thedrag. Parameters: buttons - one or more of the InputEvent.BUTTON1_MASK InputEvent BUTTONN_MASK fields. |
actionDrag | public void actionDrag(Component dragSource, int sx, int sy)(Code) | | Perform a drag action. Grabs at the given explicit location.
|
actionDrag | public void actionDrag(Component dragSource, int sx, int sy, String buttons)(Code) | | Perform a drag action. Grabs at the given location with the given
modifiers.
Parameters: dragSource - source of the drag Parameters: sx - X coordinate Parameters: sy - Y coordinate Parameters: buttons - a String representation of key modifiers,e.g. "ALT|SHIFT", based on the InputEvent.ALT_MASK InputEvent_MASK fields.ComponentTester.actionDrag(Component,ComponentLocation,int) ComponentLocation/integer modifier mask |
actionDragOver | public void actionDragOver(Component target)(Code) | | Drag the current dragged object over the given component.
|
actionDrop | public void actionDrop(Component dropTarget)(Code) | | Perform a basic drop action (implicitly causing preceding mouse
drag motion). Drops in the center of the component.
|
actionDrop | public void actionDrop(Component dropTarget, ComponentLocation loc)(Code) | | Perform a basic drop action (implicitly causing preceding mouse
drag motion).
|
actionDrop | public void actionDrop(Component dropTarget, int x, int y)(Code) | | Perform a basic drop action (implicitly causing preceding mouse
drag motion). The modifiers represents the set of active modifiers
when the drop is made.
|
actionFocus | public void actionFocus(Component comp)(Code) | | Set the focus on to the given component.
|
actionKeyPress | public void actionKeyPress(Component comp, int keyCode)(Code) | | Send a key press event for the given virtual key code to the given
Component.
|
actionKeyPress | public void actionKeyPress(int keyCode)(Code) | | Generate a key press event for the given virtual key code.
|
actionKeyRelease | public void actionKeyRelease(Component comp, int keyCode)(Code) | | Generate a key release event sent to the given component.
|
actionKeyRelease | public void actionKeyRelease(int keyCode)(Code) | | Generate a key release event.
|
actionKeyString | public void actionKeyString(String string)(Code) | | Send events required to generate the given string.
|
actionKeyStroke | public void actionKeyStroke(Component c, int keyCode)(Code) | | Send the given keystroke, which must be the KeyEvent field name of a
KeyEvent VK_ constant to the program. Sends a key down/up, with no
modifiers. The focus is changed to the target component.
|
actionKeyStroke | public void actionKeyStroke(int keyCode)(Code) | | Send the given keystroke, which must be the KeyEvent field name of a
KeyEvent VK_ constant. Sends a key press and key release, with no
modifiers. Note that this method does not affect the current focus.
|
actionKeyStroke | public void actionKeyStroke(Component c, int keyCode, int modifiers)(Code) | | Send the given keystroke, which must be the KeyEvent field name of a
KeyEvent VK_ constant to the program. Sends a key down/up, with the
given modifiers, which should be the InputEvent field name modifier
masks optionally ORed together with "|". The focus is changed to the
target component.
|
actionKeyStroke | public void actionKeyStroke(int keyCode, int modifiers)(Code) | | Send the given keystroke, which must be the KeyEvent field name of a
KeyEvent VK_ constant to the program. Sends a key down/up, with the
given modifiers, which should be the InputEvent field name modifier
masks optionally ORed together with "|". Note that this does not
affect the current focus.
|
actionMousePress | public void actionMousePress(Component comp, ComponentLocation loc, int mask)(Code) | | Press mouse buttons corresponding to the given mask at the given
location.
|
actionMouseRelease | public void actionMouseRelease()(Code) | | Release any currently held mouse buttons.
|
actionSelectAWTMenuItem | public void actionSelectAWTMenuItem(Frame menuFrame, String path)(Code) | | Selects an AWT menu item (
java.awt.MenuItem ) and returns when
the invocation has triggered (though not necessarily completed).
Parameters: menuFrame - Parameters: path - either a unique label or the menu path. See Also: Robot.selectAWTMenuItem(FrameString) |
actionSelectMenuItem | public void actionSelectMenuItem(Component item)(Code) | | Select the given menu item.
|
actionSelectMenuItem | public void actionSelectMenuItem(Component sameWindow, String path)(Code) | | Select the given menu item, given its path and a component on the same
window.
|
actionSelectPopupMenuItem | public void actionSelectPopupMenuItem(Component invoker, String path)(Code) | | Pop up a menu at the center of the given component and
select the given item.
|
actionSelectPopupMenuItem | public void actionSelectPopupMenuItem(Component invoker, ComponentLocation loc, String path)(Code) | | Pop up a menu at the given location on the given component and
select the given item.
|
actionSelectPopupMenuItem | public void actionSelectPopupMenuItem(Component invoker, int x, int y, String path)(Code) | | Pop up a menu at the given coordinates on the given component and
select the given item.
|
actionSetModifiers | public void actionSetModifiers(int mask, boolean pressed)(Code) | | Set the state of the given modifier keys.
|
actionShowPopupMenu | public void actionShowPopupMenu(Component invoker)(Code) | | Pop up a menu in the center of the given component.
|
actionShowPopupMenu | public void actionShowPopupMenu(Component invoker, int x, int y)(Code) | | Pop up a menu at the given location on the given component.
|
actionWaitForIdle | public void actionWaitForIdle()(Code) | | Wait for an idle AWT event queue. Will return when there are no more
events on the event queue.
|
assertComponentShowing | public boolean assertComponentShowing(ComponentReference ref)(Code) | | Return whether the Component represented by the given
ComponentReference is available.
|
assertFrameShowing | public boolean assertFrameShowing(Hierarchy h, String id)(Code) | | Returns whether a Window corresponding to the given String is
showing. The string may be a plain String or regular expression and
may match either the window title (for Frames or Dialogs) or the
value of
Component.getName .
|
assertImage | public boolean assertImage(Component comp, java.io.File fileImage, boolean ignoreBorder)(Code) | | Return whether the component's contents matches the given image.
|
deriveAccessibleTag | protected String deriveAccessibleTag(AccessibleContext context)(Code) | | Derive a tag from the given accessible context if possible, or return
null.
|
deriveTag | public String deriveTag(Component comp)(Code) | | Determine a component-specific identifier not already defined in other
component attributes. This method should be defined to something
unique for custom UI components.
|
getActions | public Method[] getActions()(Code) | | Return a list of all actions defined by this class that don't depend
on a component argument.
|
getAssertMethods | public Method[] getAssertMethods()(Code) | | Return a list of all assertions defined by this class that don't
depend on a component argument.
|
getComponentActions | public Method[] getComponentActions()(Code) | | Return a list of all actions defined by this class that require
a component argument.
|
getComponentAssertMethods | public Method[] getComponentAssertMethods()(Code) | | Return a list of all assertions defined by this class that require a
component argument.
|
getPropertyMethods | public Method[] getPropertyMethods()(Code) | | Return an array of all property check methods defined by this class.
The first argument must be a Component.
|
getTag | public static String getTag(Component comp)(Code) | | Return a reasonable identifier for the given component.
Note that this should not duplicate information provided by existing
attributes such as title, label, or text.
This functionality is provided to assist in identification of
non-standard GUI components only.
|
getTestedClass | public Class getTestedClass(Class cls)(Code) | | Return the Component class that corresponds to this
ComponentTester
class. For example,
JComponentTester.getTestedClass(JLabel.class)
would return JComponent.class.
|
getTester | public static ComponentTester getTester(Component comp)(Code) | | Return a shared instance of the appropriate
ComponentTester for the given
Component .
This method is primarily used by the scripting system, since the
appropriate ComponentTester for a given
Component is not known a priori. Coded unit tests should generally just
create an instance of the desired type of ComponentTester
for local use.
|
getTester | public static ComponentTester getTester(Class componentClass)(Code) | | Return a shared instance of the corresponding
ComponentTester object for the given
Component class, chaining up the inheritance tree if no specific tester is found
for that class.
The abbot tester package is searched first, followed by the tester
extensions package.
This method is primarily used by the scripting system, since the
appropriate ComponentTester for a given Component is not
known a priori. Coded unit tests should generally just create
an instance of the desired type of ComponentTester for
local use.
|
isCustom | protected boolean isCustom(Class c)(Code) | | Returns whether the given class is not a core JRE class.
|
isExtension | final public boolean isExtension()(Code) | | Return whether this tester is an extension.
|
parseLocation | public ComponentLocation parseLocation(String encoded)(Code) | | Parse the String representation of a ComponentLocation into
the actual ComponentLocation object.
|
setTester | public static void setTester(Class forClass, ComponentTester tester)(Code) | | Establish the given ComponentTester as the one to use for the given
class. This may be used to override the default tester for a given
core class. Note that this will only work with components loaded by
the framework class loader, not those loaded by the class loader for
the code under test.
|
stripHTML | public static String stripHTML(String str)(Code) | | Quick and dirty strip raw text from html, for getting the basic text
from html-formatted labels and buttons. Behavior is undefined for
badly formatted html.
|
waitForComponentShowing | public void waitForComponentShowing(ComponentReference ref)(Code) | | Wait for the Component represented by the given ComponentReference to
become available. The timeout is affected by
abbot.robot.component_delay, which defaults to 30s.
|
waitForFrameShowing | public void waitForFrameShowing(Hierarchy h, String identifier)(Code) | | Convenience wait for a window to be displayed. The given string may
be a plain String or regular expression and may match either the window
title (for Frames and Dialogs) or the value of
Component.getName .
This method is provided as a convenience for hand-coded tests, since
scripts will use a wait step instead.
The property abbot.robot.component_delay affects the
default timeout.
|
waitForFrameShowing | public void waitForFrameShowing(String identifier)(Code) | | Convenience wait for a window to be displayed. The given string may
be a plain String or regular expression and may match either the window
title (for Frames and Dialogs) or the value of
Component.getName .
This method is provided as a convenience for hand-coded tests, since
scripts will use a wait step instead.
The property abbot.robot.component_delay affects the default timeout.
ComponentTester.waitForFrameShowing(Hierarchy,String) |
Methods inherited from abbot.tester.Robot | public void activate(Window win)(Code)(Java Doc) public static boolean canMoveWindows()(Code)(Java Doc) public static boolean canResizeWindows()(Code)(Java Doc) public BufferedImage capture(Rectangle bounds)(Code)(Java Doc) public BufferedImage capture(Component comp)(Code)(Java Doc) public BufferedImage capture(Component comp, boolean ignoreBorder)(Code)(Java Doc) final public void click(Component comp)(Code)(Java Doc) final public void click(Component comp, int mask)(Code)(Java Doc) final public void click(Component comp, int x, int y)(Code)(Java Doc) final public void click(Component comp, int x, int y, int mask)(Code)(Java Doc) public void click(Component comp, int x, int y, int mask, int count)(Code)(Java Doc) public void close(Window w)(Code)(Java Doc) public void deiconify(Frame frame)(Code)(Java Doc) public void delay(int ms)(Code)(Java Doc) protected static String descriptiveClassName(Class cls)(Code)(Java Doc) public void drag(Component src, int sx, int sy)(Code)(Java Doc) public void drag(Component src, int sx, int sy, int buttons)(Code)(Java Doc) public void dragOver(Component dst, int x, int y)(Code)(Java Doc) public void drop(Component target, int x, int y)(Code)(Java Doc) public Component findFocusOwner()(Code)(Java Doc) protected void fireAccessibleAction(Component context, AccessibleAction action, String name)(Code)(Java Doc) public void focus(Component comp)(Code)(Java Doc) public void focus(Component comp, boolean wait)(Code)(Java Doc) public static int getAutoDelay()(Code)(Java Doc) public static String getBorderTitle(Component c)(Code)(Java Doc) public static Class getCanonicalClass(Class refClass)(Code)(Java Doc) protected Point getCloseLocation(Container c)(Code)(Java Doc) public static String getDescriptiveName(Component c)(Code)(Java Doc) public static String getEventID(AWTEvent event)(Code)(Java Doc) public static int getEventID(Class cls, String id)(Code)(Java Doc) public static int getEventMode()(Code)(Java Doc) public static String getEventModeDescription()(Code)(Java Doc) public static int getEventPostDelay()(Code)(Java Doc) protected EventQueue getEventQueue(Component c)(Code)(Java Doc) public static String getIconName(Component c)(Code)(Java Doc) protected Point getIconifyLocation(Container c)(Code)(Java Doc) public static int getIndex(Container parent, Component comp)(Code)(Java Doc) public static String getLabel(Component c)(Code)(Java Doc) protected Point getMaximizeLocation(Container c)(Code)(Java Doc) protected Point getMoveLocation(Container c)(Code)(Java Doc) public static String getName(Component c)(Code)(Java Doc) public static int getPreferredRobotAutoDelay()(Code)(Java Doc) protected Point getResizeLocation(Container c)(Code)(Java Doc) public static java.awt.Robot getRobot()(Code)(Java Doc) public static InputState getState()(Code)(Java Doc) public static String getText(Component c)(Code)(Java Doc) public static String getTitle(Component c)(Code)(Java Doc) public void iconify(Frame frame)(Code)(Java Doc) public void invokeAction(Runnable action)(Code)(Java Doc) public void invokeAction(Component c, Runnable action)(Code)(Java Doc) public void invokeAndWait(Component c, Runnable action)(Code)(Java Doc) public void invokeAndWait(Runnable action)(Code)(Java Doc) public void invokeLater(Component context, Runnable action)(Code)(Java Doc) public void invokeLater(Runnable action)(Code)(Java Doc) protected boolean isReadyForInput(Component c)(Code)(Java Doc) protected void jitter(Component comp, int x, int y)(Code)(Java Doc) protected void jitter(int x, int y)(Code)(Java Doc) public void key(int keycode)(Code)(Java Doc) public void key(int keycode, int modifiers)(Code)(Java Doc) public void keyPress(int keycode)(Code)(Java Doc) public void keyRelease(int keycode)(Code)(Java Doc) public void keyString(String str)(Code)(Java Doc) public void keyStroke(char ch)(Code)(Java Doc) public void maximize(Frame frame)(Code)(Java Doc) public void mouseMove(Component comp)(Code)(Java Doc) public void mouseMove(Component comp, int x, int y)(Code)(Java Doc) public void mousePress(int buttons)(Code)(Java Doc) public void mousePress(Component comp)(Code)(Java Doc) public void mousePress(Component comp, int mask)(Code)(Java Doc) public void mousePress(Component comp, int x, int y)(Code)(Java Doc) public void mousePress(Component comp, int x, int y, int mask)(Code)(Java Doc) public void mouseRelease()(Code)(Java Doc) public void mouseRelease(int buttons)(Code)(Java Doc) public void move(Container comp, int newx, int newy)(Code)(Java Doc) public void moveBy(Container comp, int dx, int dy)(Code)(Java Doc) public void normalize(Frame frame)(Code)(Java Doc) protected void postEvent(Component comp, AWTEvent ev)(Code)(Java Doc) protected boolean postInvocationEvent(EventQueue eq, Toolkit toolkit, long timeout)(Code)(Java Doc) protected boolean queueBlocked()(Code)(Java Doc) public void reset()(Code)(Java Doc) public void resize(Container comp, int width, int height)(Code)(Java Doc) public void resizeBy(Container comp, int dx, int dy)(Code)(Java Doc) public Color sample(int x, int y)(Code)(Java Doc) public Color sample(Component c, int x, int y)(Code)(Java Doc) public Color sample(Component c, ComponentLocation loc)(Code)(Java Doc) public void selectAWTMenuItem(Frame frame, String path)(Code)(Java Doc) public void selectAWTMenuItem(MenuComponent item)(Code)(Java Doc) public void selectAWTMenuItemByLabel(Frame frame, String path)(Code)(Java Doc) public void selectAWTPopupMenuItem(Component invoker, String path)(Code)(Java Doc) public void selectAWTPopupMenuItem(MenuComponent item)(Code)(Java Doc) public void selectAWTPopupMenuItemByLabel(Component invoker, String path)(Code)(Java Doc) public void selectMenuItem(Component sameWindow, String path)(Code)(Java Doc) public void selectMenuItem(Component item)(Code)(Java Doc) public void selectPopupMenuItem(Component invoker, ComponentLocation loc, String path)(Code)(Java Doc) public void sendEvent(AWTEvent event)(Code)(Java Doc) public static void setAutoDelay(int ms)(Code)(Java Doc) public static void setEventMode(int mode)(Code)(Java Doc) public static void setEventPostDelay(int delay)(Code)(Java Doc) public void setModifiers(int modifiers, boolean press)(Code)(Java Doc) public Component showPopupMenu(Component invoker)(Code)(Java Doc) public Component showPopupMenu(Component invoker, int x, int y)(Code)(Java Doc) public static String simpleClassName(Class cls)(Code)(Java Doc) public void sleep()(Code)(Java Doc) public static String toHierarchyPath(Component c)(Code)(Java Doc) public static String toString(Component comp)(Code)(Java Doc) public static String toString(Object obj)(Code)(Java Doc) public static String toString(AWTEvent event)(Code)(Java Doc) final protected static boolean useScreenMenuBar()(Code)(Java Doc) protected boolean userMovable(Component comp)(Code)(Java Doc) protected boolean userResizable(Component comp)(Code)(Java Doc) public void wait(Condition condition)(Code)(Java Doc) public void wait(Condition condition, long timeout)(Code)(Java Doc) public void wait(Condition condition, long timeout, int interval)(Code)(Java Doc) public void waitForIdle()(Code)(Java Doc)
|
|
|