Package | Description |
---|---|
org.fest.swing.applet |
Support for testing Java Applets.
|
org.fest.swing.awt |
Utility methods related to AWT.
|
org.fest.swing.cell | |
org.fest.swing.core |
Building blocks for all FEST-Swing fixtures.
|
org.fest.swing.data |
Simple (but useful) data structures.
|
org.fest.swing.driver |
Drivers that simulate user input on GUI
s. |
org.fest.swing.fixture |
The power and flexibility of FEST-Swing come from the fixtures in
this package.
|
org.fest.swing.format |
Component formatters that create a
String representation of GUI components. |
org.fest.swing.hierarchy |
GUI component hierarchies.
|
org.fest.swing.launcher |
Launches applications from a "main" method and Java applets
|
org.fest.swing.monitor |
Monitors that track the state of GUI components (intended for internal use only.)
|
org.fest.swing.query |
Queries, executed in the event dispatch thread (EDT,) that read property values from GUI components.
|
Modifier and Type | Method and Description |
---|---|
static AppletViewer |
AppletViewer.newViewer(Applet applet)
Creates a new
AppletViewer . |
static AppletViewer |
AppletViewer.newViewer(Applet applet,
AppletStub stub)
Creates a new
AppletViewer . |
static AppletViewer |
AppletViewer.newViewer(Applet applet,
Map<String,String> parameters)
Creates a new
AppletViewer . |
void |
AppletViewer.showStatus(String status)
Displays the given status message.
|
Modifier and Type | Method and Description |
---|---|
static Point |
AWT.visibleCenterOf(Component c)
Returns a point at the center of the visible area of the given
. |
Modifier and Type | Interface and Description |
---|---|
interface |
JTableCellWriter
Understands how to edit the value of a cell in a
. |
Modifier and Type | Interface and Description |
---|---|
interface |
ComponentFinder
Understands GUI
lookup. |
Modifier and Type | Method and Description |
---|---|
void |
BasicRobot.cleanUp()
Cleans up any used resources (keyboard, mouse, open windows and
) used by this
robot. |
void |
BasicRobot.cleanUpWithoutDisposingWindows()
Cleans up any used resources (keyboard, mouse and
) used by this robot. |
void |
BasicRobot.click(Component c)
Simulates a user clicking once the given
using the left mouse button. |
void |
BasicRobot.click(Component c,
MouseButton button)
Simulates a user clicking once the given
using the given mouse button. |
void |
BasicRobot.click(Component c,
MouseButton button,
int times)
Simulates a user clicking the given mouse button, the given times on the given
. |
void |
BasicRobot.click(Component c,
Point where)
Simulates a user clicking at the given position on the given
. |
void |
BasicRobot.click(Component c,
Point where,
MouseButton button,
int times)
Simulates a user clicking the given mouse button, the given times at the given position on the given
. |
void |
BasicRobot.click(Point where,
MouseButton button,
int times)
Simulates a user clicking the given mouse button, the given times at the given absolute coordinates.
|
void |
BasicRobot.close(Window w)
Simulates a user closing the given window.
|
void |
BasicRobot.doubleClick(Component c)
Simulates a user double-clicking the given
. |
void |
ComponentDragAndDrop.drag(Component target,
Point where)
Performs a drag action at the given point.
|
void |
ComponentDragAndDrop.drop(Component target,
Point where)
Ends a drag operation, releasing the mouse button over the given target location.
|
void |
BasicRobot.enterText(String text)
Simulates a user entering the given text.
|
Component |
BasicComponentFinder.find(ComponentMatcher m)
Finds a
using the given . |
Component |
BasicComponentFinder.find(Container root,
ComponentMatcher m)
Finds a
using the given in the hierarchy
under the given root. |
<T extends Component> |
BasicComponentFinder.find(Container root,
GenericTypeMatcher<T> m)
Finds a
using the given in the hierarchy
under the given root. |
<T extends Component> |
BasicComponentFinder.find(GenericTypeMatcher<T> m)
Finds a
using the given . |
JPopupMenu |
BasicRobot.findActivePopupMenu()
Returns the currently active pop-up menu, if any.
|
Component |
BasicComponentFinder.findByLabel(Container root,
String label)
|
Component |
BasicComponentFinder.findByLabel(Container root,
String label,
boolean showing)
|
<T extends Component> |
BasicComponentFinder.findByLabel(Container root,
String label,
Class<T> type)
|
<T extends Component> |
BasicComponentFinder.findByLabel(Container root,
String label,
Class<T> type,
boolean showing)
|
Component |
BasicComponentFinder.findByLabel(String label)
|
Component |
BasicComponentFinder.findByLabel(String label,
boolean showing)
|
<T extends Component> |
BasicComponentFinder.findByLabel(String label,
Class<T> type)
|
<T extends Component> |
BasicComponentFinder.findByLabel(String label,
Class<T> type,
boolean showing)
|
Component |
BasicComponentFinder.findByName(Container root,
String name)
Finds a
by name, in the hierarchy under the given root. |
Component |
BasicComponentFinder.findByName(Container root,
String name,
boolean showing)
Finds a
by name, in the hierarchy under the given root. |
<T extends Component> |
BasicComponentFinder.findByName(Container root,
String name,
Class<T> type)
Finds a
by name and type, in the hierarchy under the given root. |
<T extends Component> |
BasicComponentFinder.findByName(Container root,
String name,
Class<T> type,
boolean showing)
Finds a
by name and type, in the hierarchy under the given root. |
Component |
BasicComponentFinder.findByName(String name)
Finds a
by name. |
Component |
BasicComponentFinder.findByName(String name,
boolean showing)
Finds a
by name. |
<T extends Component> |
BasicComponentFinder.findByName(String name,
Class<T> type)
Finds a
by name and type. |
<T extends Component> |
BasicComponentFinder.findByName(String name,
Class<T> type,
boolean showing)
Finds a
by name and type. |
<T extends Component> |
BasicComponentFinder.findByType(Class<T> type,
boolean showing)
Finds a
by type. |
<T extends Component> |
BasicComponentFinder.findByType(Container root,
Class<T> type)
Finds a
by type in the hierarchy under the given root. |
<T extends Component> |
BasicComponentFinder.findByType(Container root,
Class<T> type,
boolean showing)
Finds a
by type in the hierarchy under the given root. |
void |
BasicRobot.focus(Component c)
Gives input focus to the given
. |
void |
BasicRobot.focusAndWaitForFocusGain(Component c)
|
static Component |
FocusOwnerFinder.inEdtFocusOwner()
Returns the focus owner.
|
void |
BasicRobot.jitter(Component c)
Makes the mouse pointer show small quick jumpy movements on the given
. |
void |
BasicRobot.jitter(Component c,
Point where)
Makes the mouse pointer show small quick jumpy movements on the given
at the given
point. |
void |
BasicRobot.moveMouse(Component c)
Simulates a user moving the mouse pointer to the center of the given
. |
void |
BasicRobot.moveMouse(Component c,
int x,
int y)
Simulates a user moving the mouse pointer to the given coordinates relative to the given
. |
void |
BasicRobot.moveMouse(Component c,
Point p)
Simulates a user moving the mouse pointer to the given coordinates relative to the given
. |
void |
BasicRobot.pressAndReleaseKey(int keyCode,
int... modifiers)
Type the given key code with the given modifiers.
|
void |
BasicRobot.pressAndReleaseKeys(int... keyCodes)
Simulates a user pressing and releasing the given keys.
|
void |
BasicRobot.pressKey(int keyCode)
Simulates a user pressing given key.
|
void |
BasicComponentPrinter.printComponents(PrintStream out)
Prints all the components in the hierarchy.
|
void |
BasicComponentPrinter.printComponents(PrintStream out,
Class<? extends Component> type)
Prints only the components of the given type in the hierarchy.
|
void |
BasicComponentPrinter.printComponents(PrintStream out,
Class<? extends Component> type,
Container root)
Prints all the components of the given type in the hierarchy under the given root.
|
void |
BasicComponentPrinter.printComponents(PrintStream out,
Container root)
Prints all the components in the hierarchy under the given root.
|
void |
BasicRobot.releaseKey(int keyCode)
Simulates a user releasing the given key.
|
void |
BasicRobot.releaseMouse(MouseButton button)
Releases the given mouse button.
|
void |
BasicRobot.releaseMouseButtons()
Releases any mouse button(s) used by the robot.
|
void |
BasicRobot.requireNoJOptionPaneIsShowing()
Ensures that there is no
showing, and potentially blocking GUI tests. |
void |
BasicRobot.rightClick(Component c)
Simulates a user right-clicking the given
. |
JPopupMenu |
BasicRobot.showPopupMenu(Component invoker)
Shows a pop-up menu.
|
JPopupMenu |
BasicRobot.showPopupMenu(Component invoker,
Point location)
Shows a pop-up menu at the given coordinates.
|
void |
BasicRobot.showWindow(Window w)
Safely display a window with proper EDT synchronization.
|
void |
BasicRobot.showWindow(Window w,
Dimension size)
Safely display a window with proper EDT synchronization.
|
void |
BasicRobot.showWindow(Window w,
Dimension size,
boolean pack)
Safely display a window with proper EDT synchronization.
|
void |
BasicRobot.type(char character)
Types the given character.
|
void |
BasicRobot.waitForIdle()
Wait for an idle AWT event queue.
|
Modifier and Type | Method and Description |
---|---|
TableCell |
TableCellInRowByValue.findCell(JTable table,
JTableCellReader cellReader)
Finds a cell in the given
that:
is located in the first row whose values match the given ones
has a matching row index
|
TableCell |
TableCellFinder.findCell(JTable table,
JTableCellReader cellReader)
Finds a cell in the given
based on some search criteria specified by this finder. |
TableCell |
TableCellByColumnId.findCell(JTable table,
JTableCellReader cellReader)
Finds a cell in the given
that has a matching row index and column id. |
Modifier and Type | Method and Description |
---|---|
AppletContext |
JAppletDriver.appletContextOf(JApplet applet)
Returns the
of the given . |
JButton |
JFileChooserDriver.approveButton(JFileChooser fileChooser)
Finds the "Approve" button in the given
. |
protected static void |
ComponentDriver.assertIsEnabledAndShowing(Component c)
Validates that the given
is enabled and showing on the screen. |
Color |
JTableDriver.background(JTable table,
TableCell cell)
Returns the background color of the given table cell.
|
JButton |
JOptionPaneDriver.button(JOptionPane optionPane)
Deprecated.
in 1.2
|
JButton |
JOptionPaneDriver.buttonWithText(JOptionPane optionPane,
Pattern pattern)
Finds a button in the
whose text matches the given regular expression pattern. |
JButton |
JOptionPaneDriver.buttonWithText(JOptionPane optionPane,
String text)
Finds a button in the
containing the given text. |
JButton |
JFileChooserDriver.cancelButton(JFileChooser fileChooser)
Finds the "Cancel" button in the given
. |
JButton |
JOptionPaneDriver.cancelButton(JOptionPane optionPane)
Finds the "Cancel" button in the
. |
void |
AbstractJTableCellWriter.cancelCellEditing(JTable table,
int row,
int column)
Cancels editing the given cell of the
. |
void |
JTableDriver.cancelCellEditing(JTable table,
TableCell cell)
Cancels editing the given cell of the
, using this driver's
. |
TableCell |
JTableDriver.cell(JTable table,
Pattern pattern)
Returns a cell from the given
whose value matches the given regular expression pattern. |
TableCell |
JTableDriver.cell(JTable table,
String value)
Returns a cell from the given
whose value matches the given one. |
TableCell |
JTableDriver.cell(JTable table,
TableCellFinder cellFinder)
Returns a cell from the given
using the given cell finder. |
protected static TableCellEditor |
AbstractJTableCellWriter.cellEditor(JTable table,
int row,
int column)
Returns the editor for the given table cell.
|
Component |
JTableDriver.cellEditor(JTable table,
TableCell cell)
Returns the editor in the given cell of the
, using this driver's
. |
protected static Point |
AbstractJTableCellWriter.cellLocation(JTable table,
int row,
int column,
JTableLocation location)
Returns the location of the given table cell.
|
void |
ComponentDriver.click(Component c)
Simulates a user clicking once the given
using the left mouse button. |
void |
ComponentDriver.click(Component c,
MouseButton button)
Simulates a user clicking once the given
using the given mouse button. |
void |
ComponentDriver.click(Component c,
MouseButton button,
int times)
Simulates a user clicking the given mouse button, the given times on the given
. |
void |
ComponentDriver.click(Component c,
MouseClickInfo mouseClickInfo)
Simulates a user clicking the given mouse button, the given times on the given
. |
void |
ComponentDriver.click(Component c,
Point where)
Simulates a user clicking at the given position on the given
. |
void |
JMenuItemDriver.click(JMenuItem menuItem)
Finds and selects the given
. |
void |
JTableDriver.click(JTable table,
TableCell cell,
MouseButton mouseButton,
int times)
Clicks the given cell, using the specified mouse button, the given number of times.
|
void |
JFileChooserDriver.clickApproveButton(JFileChooser fileChooser)
Finds and clicks the "Approve" button in the given
. |
void |
JFileChooserDriver.clickCancelButton(JFileChooser fileChooser)
Finds and clicks the "Cancel" button in the given
. |
void |
JTableHeaderDriver.clickColumn(JTableHeader tableHeader,
int columnIndex)
Clicks the column under the given index.
|
void |
JTableHeaderDriver.clickColumn(JTableHeader tableHeader,
int columnIndex,
MouseButton button,
int times)
Clicks the column under the given index using the given mouse button the given number of times.
|
void |
JTableHeaderDriver.clickColumn(JTableHeader tableHeader,
Pattern columnNamePattern)
Clicks the column which name matches the given regular expression pattern.
|
void |
JTableHeaderDriver.clickColumn(JTableHeader tableHeader,
Pattern columnNamePattern,
MouseButton button,
int times)
Clicks the column which name matches the given regular expression pattern using the given mouse button the given
number of times.
|
void |
JTableHeaderDriver.clickColumn(JTableHeader tableHeader,
String columnName)
Clicks the column which name matches the given value.
|
void |
JTableHeaderDriver.clickColumn(JTableHeader tableHeader,
String columnName,
MouseButton button,
int times)
Clicks the column which name matches the given one using the given mouse button the given number of times.
|
void |
JListDriver.clickItem(JList list,
int index,
MouseButton button,
int times)
Clicks the item under the given index, using the specified mouse button, the given number times.
|
void |
JTreeDriver.clickPath(JTree tree,
String path)
Clicks the given path, expanding parent nodes if necessary.
|
void |
JTreeDriver.clickPath(JTree tree,
String path,
MouseButton button)
Clicks the given path, expanding parent nodes if necessary.
|
void |
JTreeDriver.clickPath(JTree tree,
String path,
MouseClickInfo mouseClickInfo)
Clicks the given path, expanding parent nodes if necessary.
|
void |
JTreeDriver.clickRow(JTree tree,
int row)
Clicks the given row.
|
void |
JTreeDriver.clickRow(JTree tree,
int row,
MouseButton button)
Clicks the given row.
|
void |
JTreeDriver.clickRow(JTree tree,
int row,
MouseClickInfo mouseClickInfo)
Clicks the given row.
|
Object |
JComponentDriver.clientProperty(JComponent c,
Object key)
Returns the client property stored in the given
, under the given key. |
void |
JInternalFrameDriver.close(JInternalFrame internalFrame)
Closes the given
. |
void |
WindowDriver.close(Window w)
Closing the
. |
URL |
JAppletDriver.codeBaseOf(JApplet applet)
Returns the URL of the directory that contains the given
. |
void |
JTreeDriver.collapsePath(JTree tree,
String path)
Collapses the given path, is possible.
|
void |
JTreeDriver.collapseRow(JTree tree,
int row)
Collapses the given row, is possible.
|
int |
JTableDriver.columnIndex(JTable table,
Object columnId)
Returns the index of the column in the given
whose id matches the given one. |
void |
ComponentShownWaiter.componentShown(ComponentEvent e)
Notification that the component to wait for is finally shown on the screen.
|
String[][] |
JTableDriver.contents(JTable table)
|
String[] |
JComboBoxDriver.contentsOf(JComboBox comboBox)
Returns an array of
String s that represents the contents of the given
list. |
String[] |
JListDriver.contentsOf(JList list)
Returns an array of
String s that represents the contents of the given ,
using this driver's . |
void |
JSpinnerDriver.decrement(JSpinner spinner)
Decrements the value of the
. |
void |
JSpinnerDriver.decrement(JSpinner spinner,
int times)
Decrements the value of the
the given number of times. |
void |
FrameDriver.deiconify(Frame frame)
Deiconifies the given
. |
void |
JInternalFrameDriver.deiconify(JInternalFrame internalFrame)
De-iconifies the given
. |
void |
JTextComponentDriver.deleteText(JTextComponent textBox)
Deletes the text of the
. |
URL |
JAppletDriver.documentBaseOf(JApplet applet)
Returns the URL of the document the given
is embedded. |
void |
ComponentDriver.doubleClick(Component c)
Simulates a user double-clicking the given
. |
void |
JTreeDriver.doubleClickPath(JTree tree,
String path)
Double-clicks the given path.
|
void |
JTreeDriver.doubleClickRow(JTree tree,
int row)
Double-clicks the given row.
|
protected void |
ComponentDriver.drag(Component c,
Point where)
Performs a drag action at the given point.
|
void |
DragAndDrop.drag(Component target,
Point where)
Deprecated.
use
instead. |
void |
JListDriver.drag(JList list,
int index)
Starts a drag operation at the location of the given index.
|
void |
JListDriver.drag(JList list,
Pattern pattern)
Starts a drag operation at the location of the first item matching the given regular expression pattern.
|
void |
JListDriver.drag(JList list,
String value)
Starts a drag operation at the location of the first item matching the given value.
|
void |
JTableDriver.drag(JTable table,
TableCell cell)
Starts a drag operation at the location of the given table cell.
|
void |
JTreeDriver.drag(JTree tree,
int row)
Starts a drag operation at the location of the given row.
|
void |
JTreeDriver.drag(JTree tree,
String path)
Starts a drag operation at the location of the given
. |
protected void |
ComponentDriver.drop(Component c,
Point where)
Ends a drag operation, releasing the mouse button over the given target location.
|
void |
DragAndDrop.drop(Component target,
Point where)
Deprecated.
use
instead. |
void |
JListDriver.drop(JList list)
Ends a drag operation at the center of the
. |
void |
JListDriver.drop(JList list,
int index)
Ends a drag operation at the location of the given index.
|
void |
JListDriver.drop(JList list,
String value)
Ends a drag operation at the location of the first item matching the given value.
|
void |
JTableDriver.drop(JTable table,
TableCell cell)
Starts a drop operation at the location of the given table cell.
|
void |
JTreeDriver.drop(JTree tree,
int row)
Ends a drag operation at the location of the given row.
|
void |
JTreeDriver.drop(JTree tree,
String path)
Ends a drag operation at the location of the given
. |
JList |
JComboBoxDriver.dropDownList()
|
JTextComponent |
JSpinnerDriver.editor(JSpinner spinner)
Returns the
used as editor in the given . |
Component |
AbstractJTableCellWriter.editorForCell(JTable table,
int row,
int column)
Returns the
used as editor of the given cell. |
void |
JComboBoxDriver.enterText(JComboBox comboBox,
String text)
Simulates a user entering the specified text in the
. |
void |
JSpinnerDriver.enterText(JSpinner spinner,
String text)
Enters the given text in the
, assuming its editor has a
under it. |
void |
JTextComponentDriver.enterText(JTextComponent textBox,
String text)
Types the given text into the
. |
void |
JSpinnerDriver.enterTextAndCommit(JSpinner spinner,
String text)
Enters and commits the given text in the
, assuming its editor has a
under it. |
void |
JTableTextComponentEditorCellWriter.enterValue(JTable table,
int row,
int column,
String value)
Enters the given value at the given cell of the
. |
void |
JTableComboBoxEditorCellWriter.enterValue(JTable table,
int row,
int column,
String value)
Enters the given value at the given cell of the
. |
void |
JTableCheckBoxEditorCellWriter.enterValue(JTable table,
int row,
int column,
String value)
Enters the given value at the given cell of the
. |
void |
JTableDriver.enterValueInCell(JTable table,
TableCell cell,
String value)
Enters the given value in the given cell of the
, using this driver's
. |
void |
JTreeDriver.expandPath(JTree tree,
String path)
Expands the given path, is possible.
|
void |
JTreeDriver.expandRow(JTree tree,
int row)
Expands the given row, is possible.
|
JTextField |
JFileChooserDriver.fileNameTextBox(JFileChooser fileChooser)
Returns the text field where the user can enter the name of the file to select.
|
void |
JToolBarDriver.floatTo(JToolBar toolBar,
int x,
int y)
Drags the
to the given location, causing it to float. |
void |
ComponentDriver.focus(Component c)
Gives input focus to the given
. |
void |
ComponentDriver.focusAndWaitForFocusGain(Component c)
|
Font |
JTableDriver.font(JTable table,
TableCell cell)
Returns the font of the given table cell.
|
Color |
JTableDriver.foreground(JTable table,
TableCell cell)
Returns the foreground color of the given table cell.
|
JScrollBar |
JScrollPaneDriver.horizontalScrollBarIn(JScrollPane scrollPane)
Returns the horizontal
in the given . |
void |
FrameDriver.iconify(Frame frame)
Iconifies the given
. |
void |
JInternalFrameDriver.iconify(JInternalFrame internalFrame)
Iconifies the given
. |
void |
JSpinnerDriver.increment(JSpinner spinner)
Increments the value of the
. |
void |
JSpinnerDriver.increment(JSpinner spinner,
int times)
Increments the value of the
the given number of times. |
int |
JListDriver.indexOf(JList list,
Pattern pattern)
Returns the index of the first item matching the given regular expression pattern.
|
int |
JListDriver.indexOf(JList list,
String value)
Returns the index of the first item matching the given value.
|
protected void |
JComponentDriver.invokeAction(JComponent c,
String name)
|
JPopupMenu |
ComponentDriver.invokePopupMenu(Component c)
Shows a pop-up menu using the given
as the invoker of the pop-up menu. |
JPopupMenu |
ComponentDriver.invokePopupMenu(Component c,
Point p)
Shows a pop-up menu at the given point using the given
as the invoker of the pop-up
menu. |
boolean |
JAppletDriver.isActive(JApplet applet)
Indicates whether the given
is active or not. |
boolean |
JToolBarDriver.isFloating(JToolBar toolBar)
Indicates whether the given
is floating or not. |
boolean |
JMenuItemLocation.isParentAMenu()
Indicates whether the parent of the
is another menu. |
void |
FrameDriver.maximize(Frame frame)
Makes the
full size. |
void |
JInternalFrameDriver.maximize(JInternalFrame internalFrame)
Maximizes the given
, deconifying it first if it is iconified. |
JMenuItem |
JPopupMenuDriver.menuItem(JPopupMenu popupMenu,
String name)
|
String[] |
JPopupMenuDriver.menuLabelsOf(JPopupMenu popupMenu)
Returns the contents of the pop-up menu as a
String array. |
void |
ContainerDriver.move(Container c,
int x,
int y)
Move the given
to the requested location. |
void |
JSplitPaneDriver.moveDividerTo(JSplitPane splitPane,
int location)
Sets the divider position to an absolute position.
|
protected void |
ComponentDriver.moveMouseIgnoringAnyError(Component c,
int x,
int y)
Simulates a user moving the mouse pointer to the given coordinates relative to the given
. |
protected void |
ComponentDriver.moveMouseIgnoringAnyError(Component c,
Point p)
Simulates a user moving the mouse pointer to the given coordinates relative to the given
. |
void |
JInternalFrameDriver.moveTo(JInternalFrame internalFrame,
Point where)
Moves the
to the given location. |
void |
JInternalFrameDriver.moveToBack(JInternalFrame internalFrame)
Brings the given
to the back. |
void |
WindowDriver.moveToBack(Window w)
If the given
is visible, sends it to the back and may cause it to lose focus or
activation if it is the focused or active. |
void |
JInternalFrameDriver.moveToFront(JInternalFrame internalFrame)
Brings the given
to the front. |
void |
WindowDriver.moveToFront(Window w)
If the given
is visible, brings it to the front and may make it the focused one. |
JButton |
JOptionPaneDriver.noButton(JOptionPane optionPane)
Finds the "No" button in the
. |
String |
JTreeDriver.nodeValue(JTree tree,
String path)
Returns the
String representation of the node at the given path. |
void |
FrameDriver.normalize(Frame frame)
Normalizes the given
. |
void |
JInternalFrameDriver.normalize(JInternalFrame internalFrame)
Normalizes the given
, deconifying it first if it is iconified. |
JButton |
JOptionPaneDriver.okButton(JOptionPane optionPane)
Finds the "OK" button in the
. |
String |
JAppletDriver.parameterValue(JApplet applet,
String parameterName)
Returns the value of the named parameter in the given
in the HTML tag, or
null if not set. |
Point |
JListDriver.pointAt(JList list,
String value)
Returns the coordinates of the first item matching the given value.
|
Point |
JTableDriver.pointAt(JTable table,
TableCell cell)
Converts the given table cell into a coordinate pair.
|
void |
ComponentDriver.pressAndReleaseKey(Component c,
int keyCode,
int[] modifiers)
Simulates a user pressing and releasing the given key on the
. |
void |
ComponentDriver.pressAndReleaseKey(Component c,
KeyPressInfo keyPressInfo)
Simulates a user pressing and releasing the given key on the
. |
void |
ComponentDriver.pressAndReleaseKeys(Component c,
int... keyCodes)
Simulates a user pressing and releasing the given keys on the
. |
void |
JComboBoxDriver.pressAndReleaseKeys(JComboBox comboBox,
int... keyCodes)
Simulates a user pressing and releasing the given keys on the
. |
void |
ComponentDriver.pressKey(Component c,
int keyCode)
Simulates a user pressing given key on the
. |
static org.fest.assertions.Description |
ComponentDriver.propertyName(Component c,
String propertyName)
Formats the name of a property of the given
by concatenating the value obtained
from with the given property name. |
void |
ComponentDriver.releaseKey(Component c,
int keyCode)
Simulates a user releasing the given key on the
. |
void |
JComboBoxDriver.replaceText(JComboBox comboBox,
String text)
Simulates a user entering the specified text in the
, replacing any text. |
void |
JTextComponentDriver.replaceText(JTextComponent textBox,
String text)
Types the given text into the
, replacing any existing text already there. |
void |
JTableDriver.requireCellValue(JTable table,
TableCell cell,
Pattern pattern)
Asserts that the value of the given cell matches the given regular expression pattern.
|
void |
JTableDriver.requireCellValue(JTable table,
TableCell cell,
String value)
Asserts that the value of the given cell matches the given value.
|
void |
JTableDriver.requireColumnCount(JTable table,
int columnCount)
Asserts that the given
has the given number of columns. |
void |
JTableDriver.requireContents(JTable table,
String[][] contents)
Asserts that the
String representation of the cell values in the is
equal to the given String array. |
void |
JProgressBarDriver.requireDeterminate(JProgressBar progressBar)
Verifies that the given
is in determinate mode. |
void |
ComponentDriver.requireDisabled(Component c)
Asserts that the
is disabled. |
void |
JComboBoxDriver.requireEditable(JComboBox comboBox)
Asserts that the given
is editable. |
void |
JTableDriver.requireEditable(JTable table,
TableCell cell)
Asserts that the given table cell is editable.
|
void |
JTextComponentDriver.requireEditable(JTextComponent textBox)
Asserts that the given
is editable. |
void |
JTreeDriver.requireEditable(JTree tree)
Asserts that the given
is editable. |
void |
JTextComponentDriver.requireEmpty(JTextComponent textBox)
Asserts that the given
is empty. |
void |
ComponentDriver.requireEnabled(Component c)
Asserts that the
is enabled. |
void |
ComponentDriver.requireEnabled(Component c,
Timeout timeout)
Asserts that the
is enabled. |
void |
JOptionPaneDriver.requireErrorMessage(JOptionPane optionPane)
Asserts that the
is displaying an error message. |
void |
ComponentDriver.requireFocused(Component c)
Asserts that the
has input focus. |
void |
JProgressBarDriver.requireIndeterminate(JProgressBar progressBar)
Verifies that the given
is in indeterminate mode. |
void |
JOptionPaneDriver.requireInformationMessage(JOptionPane optionPane)
Asserts that the
is displaying an information message. |
void |
JComboBoxDriver.requireItemCount(JComboBox comboBox,
int expected)
Verifies that number of items in the given
is equal to the expected one. |
void |
JListDriver.requireItemCount(JList list,
int expected)
Verifies that number of items in the given
is equal to the expected one. |
void |
JOptionPaneDriver.requireMessage(JOptionPane optionPane,
Object message)
Asserts that the title of the
matches the given value. |
void |
JOptionPaneDriver.requireMessage(JOptionPane optionPane,
Pattern pattern)
Asserts that the title of the
matches the given regular expression pattern. |
void |
DialogDriver.requireModal(Dialog dialog)
Asserts that the
is modal. |
void |
JComboBoxDriver.requireNoSelection(JComboBox comboBox)
Verifies that the
does not have any selection. |
void |
JListDriver.requireNoSelection(JList list)
Verifies that the
does not have a selection. |
void |
JTableDriver.requireNoSelection(JTable table)
Verifies that the
does not have any selection. |
void |
JTreeDriver.requireNoSelection(JTree tree)
Asserts that the given
does not have any selection. |
void |
JComboBoxDriver.requireNotEditable(JComboBox comboBox)
Asserts that the given
is not editable. |
void |
JTableDriver.requireNotEditable(JTable table,
TableCell cell)
Asserts that the given table cell is not editable.
|
void |
JTextComponentDriver.requireNotEditable(JTextComponent textBox)
Asserts that the given
is not editable. |
void |
JTreeDriver.requireNotEditable(JTree tree)
Asserts that the given
is not editable. |
void |
AbstractButtonDriver.requireNotSelected(AbstractButton button)
Verifies that the button is not selected.
|
void |
ComponentDriver.requireNotVisible(Component c)
Asserts that the
is not visible. |
void |
JOptionPaneDriver.requireOptions(JOptionPane optionPane,
Object[] options)
Asserts that the
has the given options. |
void |
JOptionPaneDriver.requirePlainMessage(JOptionPane optionPane)
Asserts that the
is displaying a plain message. |
void |
JOptionPaneDriver.requireQuestionMessage(JOptionPane optionPane)
Asserts that the
is displaying a question. |
void |
JTableDriver.requireRowCount(JTable table,
int rowCount)
Asserts that the given
has the given number of rows. |
void |
AbstractButtonDriver.requireSelected(AbstractButton button)
Verifies that the button is selected.
|
void |
JListDriver.requireSelectedItems(JList list,
int... indices)
Verifies that the given item indices are selected in the
. |
void |
JListDriver.requireSelectedItems(JList list,
Pattern... patterns)
Verifies that the selected items in the
match the given regular expression patterns. |
void |
JListDriver.requireSelectedItems(JList list,
String... items)
Verifies that the selected items in the
match the given values. |
void |
JTableDriver.requireSelectedRows(JTable table,
int... rows)
Asserts that the set of selected rows in the given
contains to the given row indices. |
void |
JComboBoxDriver.requireSelection(JComboBox comboBox,
int index)
Verifies that the index of the selected item in the
is equal to the given value. |
void |
JComboBoxDriver.requireSelection(JComboBox comboBox,
Pattern pattern)
Verifies that the
String representation of the selected item in the
matches the given regular expression pattern. |
void |
JComboBoxDriver.requireSelection(JComboBox comboBox,
String value)
Verifies that the
String representation of the selected item in the
matches the given text. |
void |
JListDriver.requireSelection(JList list,
int index)
Verifies that the selected index in the
matches the given value. |
void |
JListDriver.requireSelection(JList list,
Pattern pattern)
Verifies that the selected item in the
matches the given regular expression pattern. |
void |
JListDriver.requireSelection(JList list,
String value)
Verifies that the selected item in the
matches the given value. |
void |
JTreeDriver.requireSelection(JTree tree,
int[] rows)
Asserts that the given
's selected rows are equal to the given one. |
void |
JTreeDriver.requireSelection(JTree tree,
String[] paths)
Asserts that the given
's selected paths are equal to the given one. |
void |
ComponentDriver.requireSize(Component c,
Dimension size)
Asserts that the size of the
is equal to given one. |
void |
JTabbedPaneDriver.requireTabTitle(JTabbedPane tabbedPane,
Pattern pattern,
Index index)
Asserts that the title of the tab at the given index matches the given regular expression pattern.
|
void |
JTabbedPaneDriver.requireTabTitle(JTabbedPane tabbedPane,
String title,
Index index)
Asserts that the title of the tab at the given index matches the given value.
|
void |
JTabbedPaneDriver.requireTabTitles(JTabbedPane tabbedPane,
String[] titles)
Asserts that the tabs of the given
have the given titles. |
void |
AbstractButtonDriver.requireText(AbstractButton button,
String expected)
Asserts that the text in the given button is equal to or matches the specified
String . |
void |
JLabelDriver.requireText(JLabel label,
Pattern pattern)
Asserts that the text of the
matches the given regular expression pattern. |
void |
JLabelDriver.requireText(JLabel label,
String expected)
Asserts that the text of the
is equal to the specified String . |
void |
JProgressBarDriver.requireText(JProgressBar progressBar,
Pattern pattern)
Asserts that the text of the
matches the given regular expression pattern. |
void |
JProgressBarDriver.requireText(JProgressBar progressBar,
String expected)
Asserts that the text of the
is equal to the specified String . |
void |
JTextComponentDriver.requireText(JTextComponent textBox,
Pattern pattern)
Asserts that the text in the given
matches the given regular expression
pattern. |
void |
JTextComponentDriver.requireText(JTextComponent textBox,
String expected)
Asserts that the text in the given
is equal to the specified value. |
void |
JOptionPaneDriver.requireTitle(JOptionPane optionPane,
Pattern pattern)
Asserts that the title in the given
matches the given regular expression pattern. |
void |
JOptionPaneDriver.requireTitle(JOptionPane optionPane,
String title)
Asserts that the title in the given
matches the given value. |
void |
JComponentDriver.requireToolTip(JComponent c,
Pattern pattern)
Asserts that the toolTip in the given
matches the given regular expression pattern. |
void |
JComponentDriver.requireToolTip(JComponent c,
String expected)
Asserts that the toolTip in the given
matches the given value. |
void |
JProgressBarDriver.requireValue(JProgressBar progressBar,
int value)
Verifies that the value of the given
is equal to the given one. |
void |
JScrollBarDriver.requireValue(JScrollBar scrollBar,
int value)
Asserts that the value of the
is equal to the given one. |
void |
JSpinnerDriver.requireValue(JSpinner spinner,
Object value)
Verifies that the value of the
is equal to the given one. |
void |
ComponentDriver.requireVisible(Component c)
Asserts that the
is visible. |
void |
JOptionPaneDriver.requireWarningMessage(JOptionPane optionPane)
Asserts that the
is displaying a warning message. |
protected void |
ContainerDriver.resize(Container c,
int width,
int height)
Resizes the
to the given size. |
void |
JAppletDriver.resize(JApplet applet,
int width,
int height)
Requests the given
to be resized. |
protected void |
ContainerDriver.resizeHeight(Container c,
int height)
Resizes the
vertically. |
void |
JInternalFrameDriver.resizeHeightTo(JInternalFrame w,
int height)
Resizes the
vertically. |
void |
WindowDriver.resizeHeightTo(Window w,
int height)
Resizes the
vertically. |
void |
JInternalFrameDriver.resizeTo(JInternalFrame internalFrame,
Dimension size)
Resizes the
to the given size. |
void |
WindowDriver.resizeTo(Window w,
Dimension size)
Resizes the
to the given size. |
protected void |
ContainerDriver.resizeWidth(Container c,
int width)
Resizes the
horizontally. |
void |
JInternalFrameDriver.resizeWidthTo(JInternalFrame internalFrame,
int width)
Resizes the
horizontally. |
void |
WindowDriver.resizeWidthTo(Window w,
int width)
Resizes the
horizontally. |
void |
ComponentDriver.rightClick(Component c)
Simulates a user right-clicking the given
. |
void |
JTreeDriver.rightClickPath(JTree tree,
String path)
Right-clicks the given path, expanding parent nodes if necessary.
|
void |
JTreeDriver.rightClickRow(JTree tree,
int row)
Right-clicks the given row.
|
int |
JTableDriver.rowCountOf(JTable table)
Returns the number of rows that can be shown in the given
, given unlimited space. |
void |
JScrollBarDriver.scrollBlockDown(JScrollBar scrollBar)
Scrolls down (or right) one block (usually a page).
|
void |
JScrollBarDriver.scrollBlockDown(JScrollBar scrollBar,
int times)
Scrolls down (or right) one block (usually a page,) the given number of times.
|
void |
JScrollBarDriver.scrollBlockUp(JScrollBar scrollBar)
Scrolls up (or left) one block (usually a page).
|
void |
JScrollBarDriver.scrollBlockUp(JScrollBar scrollBar,
int times)
Scrolls up (or left) one block (usually a page,) the given number of times.
|
void |
JScrollBarDriver.scrollTo(JScrollBar scrollBar,
int position)
Scrolls to the given position.
|
void |
JScrollBarDriver.scrollToMaximum(JScrollBar scrollBar)
Scrolls to the maximum position of the given
. |
void |
JScrollBarDriver.scrollToMinimum(JScrollBar scrollBar)
Scrolls to the minimum position of the given
. |
void |
AbstractButtonDriver.select(AbstractButton button)
Selects the given button only it is not already selected.
|
void |
JTextComponentDriver.selectAll(JTextComponent textBox)
Selects the text in the
. |
void |
JComboBoxDriver.selectAllText(JComboBox comboBox)
Simulates a user selecting the text in the
. |
void |
JTableDriver.selectCell(JTable table,
TableCell cell)
Selects the given cell, if it is not selected already.
|
Component |
JTabbedPaneDriver.selectedComponentOf(JTabbedPane tabbedPane)
Returns the currently selected component for the given
. |
void |
JFileChooserDriver.selectFile(JFileChooser fileChooser,
File file)
Selects the given file in the
. |
String[] |
JListDriver.selectionOf(JList list)
Returns an array of
String s that represents the selection in the given ,
using this driver's . |
String |
JTableDriver.selectionValue(JTable table)
Returns the
String representation of the value of the selected cell, using this driver's
. |
void |
JComboBoxDriver.selectItem(JComboBox comboBox,
int index)
Selects the item under the given index in the
. |
void |
JComboBoxDriver.selectItem(JComboBox comboBox,
Pattern pattern)
Selects the first item matching the given regular expression pattern in the
. |
void |
JComboBoxDriver.selectItem(JComboBox comboBox,
String value)
Selects the first item matching the given text in the
. |
void |
JListDriver.selectItem(JList list,
int index)
Selects the item under the given index using left mouse button once.
|
void |
JListDriver.selectItem(JList list,
Pattern pattern)
Selects the item in the given
whose value matches the given regular expression pattern. |
void |
JListDriver.selectItem(JList list,
String value)
Selects the item in the given
whose value matches the given one. |
void |
JListDriver.selectItems(JList list,
int start,
int end)
Selects the items in the specified range.
|
void |
JListDriver.selectItems(JList list,
Pattern[] patterns)
Selects the items matching the given regular expression patterns.
|
void |
JListDriver.selectItems(JList list,
Range.From from,
Range.To to)
Selects the items in the specified range.
|
void |
JListDriver.selectItems(JList list,
String[] values)
Selects the items matching the given values.
|
void |
JTreeDriver.selectPath(JTree tree,
String path)
Selects the given path, expanding parent nodes if necessary.
|
void |
JTreeDriver.selectPaths(JTree tree,
String[] paths)
Selects the given paths, expanding parent nodes if necessary.
|
void |
JTreeDriver.selectRow(JTree tree,
int row)
Selects the given row.
|
void |
JTableDriver.selectRows(JTable table,
int... rows)
Simulates a user selecting the given rows in the given
. |
void |
JTreeDriver.selectRows(JTree tree,
int[] rows)
Selects the given rows.
|
void |
JTabbedPaneDriver.selectTab(JTabbedPane tabbedPane,
Pattern pattern)
Simulates a user selecting the tab whose title matches the given regular expression pattern.
|
void |
JTabbedPaneDriver.selectTab(JTabbedPane tabbedPane,
String title)
Simulates a user selecting the tab containing the given title.
|
void |
JTextComponentDriver.selectText(JTextComponent textBox,
int start,
int end)
Select the given text range.
|
void |
JTextComponentDriver.selectText(JTextComponent textBox,
String text)
Select the given text range.
|
void |
JSpinnerDriver.selectValue(JSpinner spinner,
Object value)
Selects the given value in the given
. |
void |
JFileChooserDriver.setCurrentDirectory(JFileChooser fileChooser,
File dir)
Sets the current directory in the
to the given one. |
void |
JTextComponentDriver.setText(JTextComponent textBox,
String text)
Sets the given text into the
. |
void |
WindowDriver.show(Window w)
Shows the
. |
void |
WindowDriver.show(Window w,
Dimension size)
Shows the
, resized to the given size. |
JPopupMenu |
JListDriver.showPopupMenu(JList list,
int index)
Shows a pop-up menu at the location of the specified item in the
. |
JPopupMenu |
JListDriver.showPopupMenu(JList list,
Pattern pattern)
Shows a pop-up menu at the location of the specified item in the
. |
JPopupMenu |
JListDriver.showPopupMenu(JList list,
String value)
Shows a pop-up menu at the location of the specified item in the
. |
JPopupMenu |
JTableHeaderDriver.showPopupMenu(JTableHeader tableHeader,
int columnIndex)
Shows a pop-up menu at the given column.
|
JPopupMenu |
JTableHeaderDriver.showPopupMenu(JTableHeader tableHeader,
Pattern pattern)
Shows a pop-up menu at the column whose name matches the given regular expression pattern.
|
JPopupMenu |
JTableHeaderDriver.showPopupMenu(JTableHeader tableHeader,
String columnName)
Shows a pop-up menu at the given column.
|
JPopupMenu |
JTreeDriver.showPopupMenu(JTree tree,
int row)
Shows a pop-up menu at the position of the node in the given row.
|
JPopupMenu |
JTreeDriver.showPopupMenu(JTree tree,
String path)
Shows a pop-up menu at the position of the last node in the given path.
|
JPopupMenu |
JTableDriver.showPopupMenuAt(JTable table,
TableCell cell)
Shows a pop-up menu at the given table cell.
|
void |
JSliderDriver.slide(JSlider slider,
int value)
Slides the knob to the requested value.
|
void |
JSliderDriver.slideToMaximum(JSlider slider)
Slides the knob to its maximum.
|
void |
JSliderDriver.slideToMinimum(JSlider slider)
Slides the knob to its minimum.
|
void |
JTableTextComponentEditorCellWriter.startCellEditing(JTable table,
int row,
int column)
Starts editing the given cell of the
. |
void |
JTableComboBoxEditorCellWriter.startCellEditing(JTable table,
int row,
int column)
Starts editing the given cell of the
. |
void |
JTableCheckBoxEditorCellWriter.startCellEditing(JTable table,
int row,
int column)
Starts editing the given cell of the
. |
void |
JTableDriver.startCellEditing(JTable table,
TableCell cell)
Starts editing the given cell of the
, using this driver's
. |
void |
AbstractJTableCellWriter.stopCellEditing(JTable table,
int row,
int column)
Stops editing the given cell of the
. |
void |
JTableDriver.stopCellEditing(JTable table,
TableCell cell)
Stops editing the given cell of the
, using this driver's
. |
JTableHeader |
JTableDriver.tableHeaderOf(JTable table)
Returns the
of the given . |
String[] |
JTabbedPaneDriver.tabTitles(JTabbedPane tabbedPane)
Returns the titles of all the tabs.
|
JTextComponent |
JOptionPaneDriver.textBox(JOptionPane optionPane)
Deprecated.
in 1.2
|
String |
AbstractButtonDriver.textOf(AbstractButton button)
Returns the text of the given button.
|
String |
JLabelDriver.textOf(JLabel label)
Returns the text of the given
. |
String |
JProgressBarDriver.textOf(JProgressBar progressBar)
Returns the text of the given
. |
String |
JSpinnerDriver.textOf(JSpinner spinner)
Returns the text displayed in the given
. |
String |
JTextComponentDriver.textOf(JTextComponent textBox)
Returns the text of the given
. |
String |
JOptionPaneDriver.title(JOptionPane optionPane)
Returns the title of the given
. |
void |
JTreeDriver.toggleRow(JTree tree,
int row)
Change the open/closed state of the given row, if possible.
|
void |
JToolBarDriver.unfloat(JToolBar toolBar)
Closes a floating
, making it go back to its original container in its last known
location. |
void |
JToolBarDriver.unfloat(JToolBar toolBar,
String constraint)
Drop the
JToolBar to the requested constraint position. |
void |
AbstractButtonDriver.unselect(AbstractButton button)
Unselects the given button only if it is selected.
|
void |
JTableDriver.validate(JTable table,
TableCell cell)
Validates that the given table cell is non
null and its indices are not out of bounds. |
void |
JTreeDriver.validatePath(JTree tree,
String path)
Verifies that the given node path exists.
|
void |
JTreeDriver.validateRow(JTree tree,
int row)
Verifies that the given row index is valid.
|
String |
JListDriver.value(JList list,
int index)
Returns the
String representation of the element under the given index, using this driver's
. |
String |
JTableDriver.value(JTable table,
int row,
int column)
Returns the
String representation of the value at the given row and column, using this driver's
. |
String |
JTableDriver.value(JTable table,
TableCell cell)
Returns the
String representation of the value at the given cell, using this driver's
. |
JScrollBar |
JScrollPaneDriver.verticalScrollBarIn(JScrollPane scrollPane)
Returns the vertical
in the given . |
protected <T extends Component> |
AbstractJTableCellWriter.waitForEditorActivation(ComponentMatcher matcher,
JTable table,
int row,
int column,
Class<T> supportedType)
Waits until the editor of the given table cell is showing on the screen.
|
protected <T extends Component> |
AbstractJTableCellWriter.waitForEditorActivation(JTable table,
int row,
int column,
Class<T> supportedType)
Waits until the editor of the given table cell is showing on the screen.
|
void |
JProgressBarDriver.waitUntilIsDeterminate(JProgressBar progressBar)
Waits until the value of the given
is in determinate mode. |
void |
JProgressBarDriver.waitUntilIsDeterminate(JProgressBar progressBar,
Timeout timeout)
Waits until the value of the given
is in determinate mode. |
void |
JProgressBarDriver.waitUntilValueIs(JProgressBar progressBar,
int value)
Waits until the value of the given
is equal to the given value. |
void |
JProgressBarDriver.waitUntilValueIs(JProgressBar progressBar,
int value,
Timeout timeout)
Waits until the value of the given
is equal to the given value. |
JButton |
JOptionPaneDriver.yesButton(JOptionPane optionPane)
Finds the "Yes" button in the
. |
Modifier and Type | Method and Description |
---|---|
static FrameFixture |
Containers.frameFixtureFor(Container contentPane)
|
static JFrame |
Containers.frameFor(Container contentPane)
|
static FrameFixture |
Containers.showInFrame(Container contentPane)
|
Modifier and Type | Method and Description |
---|---|
static String |
Formatting.inEdtFormat(Component c)
Returns a
String representation of the given . |
Modifier and Type | Method and Description |
---|---|
void |
TransientWindowListener.eventDispatched(AWTEvent e) |
Modifier and Type | Method and Description |
---|---|
static AppletLauncher |
AppletLauncher.applet(Class<? extends Applet> appletType)
Creates a new applet launcher.
|
static AppletLauncher |
AppletLauncher.applet(String appletType)
Creates a new applet launcher.
|
Modifier and Type | Method and Description |
---|---|
static WindowMonitor |
WindowMonitor.instance()
Returns the singleton instance of this class.
|
Modifier and Type | Method and Description |
---|---|
static Color |
ComponentBackgroundQuery.backgroundOf(Component component)
Returns the background color of the given
. |
static Font |
ComponentFontQuery.fontOf(Component component)
Returns the font of the given
. |
static Color |
ComponentForegroundQuery.foregroundOf(Component component)
Returns the foreground color of the given
. |
static boolean |
ComponentHasFocusQuery.hasFocus(Component component)
Indicates whether the given
has input focus or not. |
static boolean |
ComponentShowingQuery.isShowing(Component component)
Indicates whether the given
is showing or not. |
static boolean |
ComponentVisibleQuery.isVisible(Component component)
Indicates whether the given
is visible or not. |
static Point |
ComponentLocationOnScreenQuery.locationOnScreen(Component component)
Returns the location of the given
on screen. |
static Container |
ComponentParentQuery.parentOf(Component component)
Returns the parent of the given
. |
static Dimension |
ComponentSizeQuery.sizeOf(Component component)
Returns the size of the given
. |
Copyright © 2007-2012 FEST (Fixtures for Easy Software Testing). All Rights Reserved.