org.uispec4j.interception
Class FileChooserHandler
java.lang.Object
org.uispec4j.interception.FileChooserHandler
public class FileChooserHandler
- extends java.lang.Object
WindowHandler implementation dedicated to file chooser dialogs.
Sample usage:
WindowInterceptor
.init(openMenu.triggerClick())
.process(FileChooserHandler.init()
.titleEquals("Select a template file")
.assertAcceptsFilesOnly()
.select("/home/bond/file.txt"))
.run();
- See Also:
- Intercepting windows
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
FileChooserHandler
public FileChooserHandler()
init
public static FileChooserHandler init()
- Creates a new interceptor with the associated
Trigger
assertIsOpenDialog
public FileChooserHandler assertIsOpenDialog()
assertIsSaveDialog
public FileChooserHandler assertIsSaveDialog()
assertCurrentDirEquals
public FileChooserHandler assertCurrentDirEquals(java.io.File currentDir)
assertCurrentFileNameEquals
public FileChooserHandler assertCurrentFileNameEquals(java.lang.String fileName)
titleEquals
public FileChooserHandler titleEquals(java.lang.String title)
assertApplyButtonTextEquals
public FileChooserHandler assertApplyButtonTextEquals(java.lang.String text)
assertAcceptsFilesOnly
public FileChooserHandler assertAcceptsFilesOnly()
assertAcceptsFilesAndDirectories
public FileChooserHandler assertAcceptsFilesAndDirectories()
assertAcceptsDirectoriesOnly
public FileChooserHandler assertAcceptsDirectoriesOnly()
assertMultiSelectionEnabled
public FileChooserHandler assertMultiSelectionEnabled(boolean enabled)
select
public WindowHandler select(java.io.File file)
select
public WindowHandler select(java.io.File[] files)
select
public WindowHandler select(java.lang.String fileName)
select
public WindowHandler select(java.lang.String[] fileNames)
cancelSelection
public WindowHandler cancelSelection()
- Clicks on "Cancel".
Copyright © 2004-2010. All Rights Reserved.