Package org.fest.swing.driver
Class WindowDriver
java.lang.Object
org.fest.swing.driver.ComponentDriver
org.fest.swing.driver.ContainerDriver
org.fest.swing.driver.WindowDriver
- Direct Known Subclasses:
DialogDriver,FrameDriver
Understands functional testing of
Windows:
- user input simulation
- state verification
- property value query
org.fest.swing.fixture in your tests.-
Field Summary
Fields inherited from class org.fest.swing.driver.ComponentDriver
robot -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidClosing the.Windowprivate static Pointprivate static voidprivate static voidvoidMoves theto the given location.WindowvoidmoveToBack(Window w) If the givenis visible, sends it to the back and may cause it to lose focus or activation if it is the focused or active.WindowvoidIf the givenis visible, brings it to the front and may make it the focused one.WindowvoidresizeHeightTo(Window w, int height) Resizes thevertically.WindowvoidResizes theto the given size.WindowvoidresizeWidthTo(Window w, int width) Resizes thehorizontally.WindowvoidShows the.WindowvoidShows the, resized to the given size.WindowMethods inherited from class org.fest.swing.driver.ContainerDriver
move, resize, resizeHeight, resizeWidthMethods inherited from class org.fest.swing.driver.ComponentDriver
assertIsEnabledAndShowing, 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, waitForShowing
-
Constructor Details
-
WindowDriver
Creates a newWindowDriver.- Parameters:
robot- the robot to use to simulate user input.
-
-
Method Details
-
resizeWidthTo
Resizes thehorizontally.Window- Parameters:
w- the targetWindow.width- the width that theWindowshould have after being resized.- Throws:
ActionFailedException- if theWindowis not enabled.ActionFailedException- if theWindowis not resizable by the user.ActionFailedException- if theWindowis not showing on the screen.
-
resizeHeightTo
Resizes thevertically.Window- Parameters:
w- the targetWindow.height- the height that theWindowshould have after being resized.- Throws:
ActionFailedException- if theWindowis not enabled.ActionFailedException- if theWindowis not resizable by the user.ActionFailedException- if theWindowis not showing on the screen.
-
resizeTo
Resizes theto the given size.Window- Parameters:
w- the targetWindow.size- the size to resize theWindowto.- Throws:
ActionFailedException- if theWindowis not enabled.ActionFailedException- if theWindowis not resizable by the user.ActionFailedException- if theWindowis not showing on the screen.
-
moveTo
Moves theto the given location.Window- Parameters:
w- the targetWindow.where- the location to move theWindowto.- Throws:
ActionFailedException- if theWindowis not enabled.ActionFailedException- if theWindowis not movable by the user.ActionFailedException- if theWindowis not showing on the screen.
-
close
Closing the.Window- Parameters:
w- the targetWindow.- Throws:
ActionFailedException- if theWindowis not enabled.ActionFailedException- if theWindowis not showing on the screen.
-
closeInfo
-
show
Shows the.Window- Parameters:
w- the targetWindow.
-
show
Shows the, resized to the given size.Window- Parameters:
w- the targetWindow.size- the size to resize theWindowto.
-
moveToFront
If the givenis visible, brings it to the front and may make it the focused one.Window- Parameters:
w- the targetWindow.
-
doMoveToFront
-
moveToBack
If the givenis visible, sends it to the back and may cause it to lose focus or activation if it is the focused or active.Window- Parameters:
w- the targetWindow.
-
doMoveToBack
-