@InternalApi public class FrameDriver extends WindowDriver
Supports functional testing of AWT or Swing Frame
s.
Note: This class is intended for internal use only. Please use the classes in the package
org.assertj.swing.fixture
in your tests.
robot
Constructor and Description |
---|
FrameDriver(Robot robot)
Creates a new
FrameDriver . |
Modifier and Type | Method and Description |
---|---|
void |
deiconify(Frame frame)
Deiconifies the given AWT or Swing
Frame . |
void |
iconify(Frame frame)
Iconifies the given AWT or Swing
Frame . |
void |
maximize(Frame frame)
Makes the AWT or Swing
Frame full size. |
void |
normalize(Frame frame)
Normalizes the given AWT or Swing
Frame . |
void |
requireTitle(Frame frame,
String expected)
Verifies that the title of the given
Frame is equal to the expected one. |
close, moveTo, moveToBack, moveToFront, resizeHeightTo, resizeTo, resizeWidthTo, show, show
doResizeHeight, doResizeWidth, isResizable, move, resize
backgroundOf, checkClickAllowed, checkInEdtEnabledAndShowing, checkInEdtShowing, click, click, click, click, click, doubleClick, drag, dragOver, drop, drop, focus, focusAndWaitForFocusGain, fontOf, foregroundOf, invokePopupMenu, invokePopupMenu, moveMouseIgnoringAnyError, moveMouseIgnoringAnyError, performAccessibleActionOf, pressAndReleaseKey, pressAndReleaseKey, pressAndReleaseKeys, pressKey, pressKeyWhileRunning, propertyName, releaseKey, requireDisabled, requireEnabled, requireEnabled, requireFocused, requireNotVisible, requireSize, requireVisible, rightClick, settings, waitForShowing
public FrameDriver(@Nonnull Robot robot)
FrameDriver
.robot
- the robot to use to simulate user input.@RunsInEDT public void iconify(@Nonnull Frame frame)
Frame
.frame
- the given Frame
.IllegalStateException
- if the Frame
is not enabled.IllegalStateException
- if the Frame
is not showing on the screen.@RunsInEDT public void deiconify(@Nonnull Frame frame)
Frame
.frame
- the given Frame
.IllegalStateException
- if the Frame
is not enabled.IllegalStateException
- if the Frame
is not showing on the screen.@RunsInEDT public void normalize(@Nonnull Frame frame)
Frame
.frame
- the given Frame
.IllegalStateException
- if the Frame
is not enabled.IllegalStateException
- if the Frame
is not showing on the screen.@RunsInEDT public void maximize(@Nonnull Frame frame)
Frame
full size.frame
- the target Frame
.IllegalStateException
- if the Frame
is not enabled.IllegalStateException
- if the Frame
is not showing on the screen.ActionFailedException
- if the operating system does not support maximizing
frames.@RunsInEDT public void requireTitle(@Nonnull Frame frame, String expected)
Frame
is equal to the expected one.frame
- the target Frame
.expected
- the expected title.AssertionError
- if the title of the given Frame
is not equal to the expected one.Copyright © 2014–2019 AssertJ. All rights reserved.