public class JFileChooserDriver extends JComponentDriver
JFileChoosers:
org.fest.swing.fixture in your tests.robot| Constructor and Description |
|---|
JFileChooserDriver(Robot robot)
Creates a new
JFileChooserDriver. |
| Modifier and Type | Method and Description |
|---|---|
JButton |
approveButton(JFileChooser fileChooser)
Finds the "Approve" button in the given
. |
JButton |
cancelButton(JFileChooser fileChooser)
Finds the "Cancel" button in the given
. |
void |
clickApproveButton(JFileChooser fileChooser)
Finds and clicks the "Approve" button in the given
. |
void |
clickCancelButton(JFileChooser fileChooser)
Finds and clicks the "Cancel" button in the given
. |
JTextField |
fileNameTextBox(JFileChooser fileChooser)
Returns the text field where the user can enter the name of the file to select.
|
void |
selectFile(JFileChooser fileChooser,
File file)
Selects the given file in the
. |
void |
selectFiles(JFileChooser fileChooser,
File[] files)
Selects the given file in the
. |
void |
setCurrentDirectory(JFileChooser fileChooser,
File dir)
Sets the current directory in the
to the given one. |
clientProperty, invokeAction, isVisible, isVisible, requireToolTip, requireToolTip, scrollToVisiblemove, resize, resizeHeight, resizeWidthassertIsEnabledAndShowing, click, click, click, click, click, doubleClick, drag, dragOver, drop, focus, focusAndWaitForFocusGain, invokePopupMenu, invokePopupMenu, moveMouseIgnoringAnyError, moveMouseIgnoringAnyError, performAccessibleActionOf, pressAndReleaseKey, pressAndReleaseKey, pressAndReleaseKeys, pressKey, propertyName, releaseKey, requireDisabled, requireEnabled, requireEnabled, requireFocused, requireNotVisible, requireSize, requireVisible, rightClick, settings, waitForShowingpublic JFileChooserDriver(Robot robot)
JFileChooserDriver.robot - the robot to use to simulate user input.@RunsInEDT public void selectFile(JFileChooser fileChooser, File file)
JFileChooser.fileChooser - the target JFileChooser.file - the file to select.NullPointerException - if the given file is null.IllegalStateException - if the JFileChooser is disabled.IllegalStateException - if the JFileChooser is not showing on the screen.IllegalArgumentException - if the JFileChooser can select directories only and the file to
select is not a directory.IllegalArgumentException - if the JFileChooser cannot select directories and the file to select
is a directory.public void selectFiles(JFileChooser fileChooser, File[] files)
JFileChooser.fileChooser - the target JFileChooser.files - the files to select.NullPointerException - if the given array of files is null.IllegalArgumentException - if the given array of files is empty.IllegalStateException - if this fixture's JFileChooser is disabled.IllegalStateException - if this fixture's JFileChooser is not showing on the screen.IllegalStateException - if this fixture's JFileChooser does not support multiple selection and
there is more than one file to select.IllegalArgumentException - if this fixture's JFileChooser can select directories only and any of
the files to select is not a directory.IllegalArgumentException - if this fixture's JFileChooser cannot select directories and any of
the files to select is a directory.@RunsInEDT public void setCurrentDirectory(JFileChooser fileChooser, File dir)
JFileChooser to the given one.fileChooser - the target JFileChooser.dir - the directory to set as current.IllegalStateException - if the JFileChooser is disabled.IllegalStateException - if the JFileChooser is not showing on the screen.@RunsInEDT public JTextField fileNameTextBox(JFileChooser fileChooser)
fileChooser - the target JFileChooser.ComponentLookupException - if a matching text field could not be found.@RunsInEDT public void clickCancelButton(JFileChooser fileChooser)
JFileChooser.fileChooser - the target JFileChooser.ComponentLookupException - if the "Cancel" button cannot be found.IllegalStateException - if the "Cancel" button is disabled.IllegalStateException - if the "Cancel" button is not showing on the screen.@RunsInEDT public JButton cancelButton(JFileChooser fileChooser)
JFileChooser.fileChooser - the target JFileChooser.ComponentLookupException - if the "Cancel" button cannot be found.@RunsInEDT public void clickApproveButton(JFileChooser fileChooser)
JFileChooser.fileChooser - the target JFileChooser.ComponentLookupException - if the "Approve" button cannot be found.IllegalStateException - if the "Approve" button is disabled.IllegalStateException - if the "Approve" button is not showing on the screen.@RunsInEDT public JButton approveButton(JFileChooser fileChooser)
JFileChooser.fileChooser - the target JFileChooser.ComponentLookupException - if the "Approve" button cannot be found.Copyright © 2007-2012 FEST (Fixtures for Easy Software Testing). All Rights Reserved.