public class DialogFixture extends WindowFixture<Dialog>
Dialogs:
BACKGROUND_PROPERTY, FONT_PROPERTY, FOREGROUND_PROPERTY, robot, targetDEFAULT_DIALOG_LOOKUP_TIMEOUT| Constructor and Description |
|---|
DialogFixture(Dialog target)
Creates a new
. |
DialogFixture(Robot robot,
Dialog target)
Creates a new
. |
DialogFixture(Robot robot,
String dialogName)
Creates a new
. |
DialogFixture(String dialogName)
Creates a new
. |
| Modifier and Type | Method and Description |
|---|---|
DialogFixture |
click()
Simulates a user clicking this fixture's
. |
DialogFixture |
click(MouseButton button)
Simulates a user clicking this fixture's
. |
DialogFixture |
click(MouseClickInfo mouseClickInfo)
Simulates a user clicking this fixture's
. |
void |
close()
Simulates a user closing this fixture's
. |
DialogFixture |
doubleClick()
Simulates a user double-clicking this fixture's
. |
protected void |
driver(DialogDriver newDriver)
Sets the
to be used by this fixture. |
DialogFixture |
focus()
Gives input focus to this fixture's
. |
DialogFixture |
moveTo(Point p)
Simulates a user moving this fixture's
to the given point. |
DialogFixture |
moveToBack()
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. |
DialogFixture |
moveToFront()
If fixture's
is visible, brings it to the front and may make it the focused one. |
DialogFixture |
pressAndReleaseKey(KeyPressInfo keyPressInfo)
Simulates a user pressing given key with the given modifiers on this fixture's
. |
DialogFixture |
pressAndReleaseKeys(int... keyCodes)
Simulates a user pressing and releasing the given keys on this fixture's
. |
DialogFixture |
pressKey(int keyCode)
Simulates a user pressing the given key on this fixture's
. |
DialogFixture |
releaseKey(int keyCode)
Simulates a user releasing the given key on this fixture's
. |
DialogFixture |
requireDisabled()
Asserts that this fixture's
is disabled. |
DialogFixture |
requireEnabled()
Asserts that this fixture's
is enabled. |
DialogFixture |
requireEnabled(Timeout timeout)
Asserts that this fixture's
is enabled. |
DialogFixture |
requireFocused()
Asserts that this fixture's
has input focus. |
DialogFixture |
requireModal()
Asserts that this fixture's
is modal. |
DialogFixture |
requireNotVisible()
Asserts that this fixture's
is not visible. |
DialogFixture |
requireSize(Dimension size)
Asserts that the size of this fixture's
is equal to given one. |
DialogFixture |
requireVisible()
Asserts that this fixture's
is visible. |
DialogFixture |
resizeHeightTo(int height)
Simulates a user resizing vertically this fixture's
. |
DialogFixture |
resizeTo(Dimension size)
Simulates a user resizing this fixture's
. |
DialogFixture |
resizeWidthTo(int width)
Simulates a user resizing horizontally this fixture's
. |
DialogFixture |
rightClick()
Simulates a user right-clicking this fixture's
. |
DialogFixture |
show()
Shows this fixture's
. |
DialogFixture |
show(Dimension size)
Shows this fixture's
, resized to the given size. |
JPopupMenuFixture |
showPopupMenu()
Shows a pop-up menu using this fixture's
as the invoker of the pop-up menu. |
JPopupMenuFixture |
showPopupMenuAt(Point p)
Shows a pop-up menu at the given point using this fixture's
as the invoker of the
pop-up menu. |
cleanUpbutton, button, button, checkBox, checkBox, checkBox, comboBox, comboBox, comboBox, dialog, dialog, dialog, dialog, dialog, dialog, fileChooser, fileChooser, fileChooser, fileChooser, fileChooser, fileChooser, find, findByName, findByType, finder, label, label, label, list, list, list, menuItem, menuItem, menuItemWithPath, optionPane, optionPane, panel, panel, panel, progressBar, progressBar, progressBar, radioButton, radioButton, radioButton, scrollBar, scrollBar, scrollBar, scrollPane, scrollPane, scrollPane, slider, slider, slider, spinner, spinner, spinner, splitPane, splitPane, splitPane, tabbedPane, tabbedPane, tabbedPane, table, table, table, textBox, textBox, textBox, toggleButton, toggleButton, toggleButton, toolBar, toolBar, toolBar, tree, tree, tree, withbackground, component, font, foreground, requireShowing, targetCastedTo, validateNotNullpublic DialogFixture(Dialog target)
DialogFixture. This constructor creates a new Robot
containing the current AWT hierarchy.target - the Dialog to be managed by this fixture.NullPointerException - if target is null.BasicRobot.robotWithCurrentAwtHierarchy()public DialogFixture(Robot robot, Dialog target)
DialogFixture.robot - performs simulation of user events on the given Dialog.target - the Dialog to be managed by this fixture.NullPointerException - if robot is null.NullPointerException - if target is null.public DialogFixture(Robot robot, String dialogName)
DialogFixture.robot - performs simulation of user events on a Dialog.dialogName - the name of the Dialog to find using the given Robot.NullPointerException - if robot is null.ComponentLookupException - if a Dialog having a matching name could not be found.ComponentLookupException - if more than one Dialog having a matching name is found.public DialogFixture(String dialogName)
DialogFixture. This constructor creates a new Robot
containing the current AWT hierarchy.dialogName - the name of the Dialog to find.ComponentLookupException - if a Dialog having a matching name could not be found.ComponentLookupException - if more than one Dialog having a matching name is found.BasicRobot.robotWithCurrentAwtHierarchy()protected final void driver(DialogDriver newDriver)
DialogDriver to be used by this fixture.newDriver - the new DialogDriver.NullPointerException - if the given driver is null.public DialogFixture click()
Dialog.public DialogFixture click(MouseButton button)
Dialog.button - the button to click.public DialogFixture click(MouseClickInfo mouseClickInfo)
Dialog.mouseClickInfo - specifies the button to click and the times the button should be clicked.NullPointerException - if the given MouseClickInfo is null.public DialogFixture doubleClick()
Dialog.public DialogFixture focus()
Dialog.public DialogFixture moveTo(Point p)
Dialog to the given point.p - the point to move this fixture's Dialog to.ActionFailedException - if the Window is not movable.ActionFailedException - if the given Window is not showing on the screen.public DialogFixture moveToFront()
Dialog is visible, brings it to the front and may make it the focused one.public DialogFixture moveToBack()
Dialog is visible, sends it to the back and may cause it to lose focus or
activation if it is the focused or active.public DialogFixture pressAndReleaseKey(KeyPressInfo keyPressInfo)
Dialog.
Modifiers is a mask from the available InputEvent masks.keyPressInfo - specifies the key and modifiers to press.NullPointerException - if the given KeyPressInfo is null.IllegalArgumentException - if the given code is not a valid key code.KeyPressInfopublic DialogFixture pressAndReleaseKeys(int... keyCodes)
Dialog.keyCodes - one or more codes of the keys to press.NullPointerException - if the given array of codes is null.IllegalArgumentException - if any of the given code is not a valid key code.KeyEventpublic DialogFixture pressKey(int keyCode)
Dialog.keyCode - the code of the key to press.IllegalArgumentException - if the given code is not a valid key code.KeyEventpublic DialogFixture releaseKey(int keyCode)
Dialog.keyCode - the code of the key to release.IllegalArgumentException - if the given code is not a valid key code.KeyEventpublic DialogFixture requireFocused()
Dialog has input focus.AssertionError - if this fixture's Dialog does not have input focus.public DialogFixture requireDisabled()
Dialog is disabled.AssertionError - if this fixture's Dialog is enabled.public DialogFixture requireEnabled()
Dialog is enabled.AssertionError - if this fixture's Dialog is disabled.public DialogFixture requireEnabled(Timeout timeout)
Dialog is enabled.timeout - the time this fixture will wait for the component to be enabled.WaitTimedOutError - if this fixture's Dialog is never enabled.public DialogFixture requireModal()
Dialog is modal.AssertionError - if this fixture's Dialog is not modal.public DialogFixture requireNotVisible()
Dialog is not visible.AssertionError - if this fixture's Dialog is visible.public DialogFixture requireSize(Dimension size)
Dialog is equal to given one.size - the given size to match.AssertionError - if the size of this fixture's Dialog is not equal to the given size.public DialogFixture requireVisible()
Dialog is visible.AssertionError - if this fixture's Dialog is not visible.public DialogFixture resizeHeightTo(int height)
Dialog.height - the height that this fixture's Dialog should have after being resized.ActionFailedException - if the Window is not resizable.public DialogFixture resizeTo(Dimension size)
Dialog.size - the size that the target window should have after being resized.ActionFailedException - if the Window is not resizable.public DialogFixture resizeWidthTo(int width)
Dialog.width - the width that this fixture's Dialog should have after being resized.ActionFailedException - if the Window is not resizable.public DialogFixture rightClick()
Dialog.public DialogFixture show()
Dialog.show in class WindowFixture<Dialog>public DialogFixture show(Dimension size)
Dialog, resized to the given size.show in class WindowFixture<Dialog>size - the size to resize this fixture's Dialog to.public JPopupMenuFixture showPopupMenu()
Dialog as the invoker of the pop-up menu.IllegalStateException - if this fixture's Dialog is disabled.IllegalStateException - if this fixture's Dialog is not showing on the screen.ComponentLookupException - if a pop-up menu cannot be found.public JPopupMenuFixture showPopupMenuAt(Point p)
Dialog as the invoker of the
pop-up menu.p - the given point where to show the pop-up menu.IllegalStateException - if this fixture's Dialog is disabled.IllegalStateException - if this fixture's Dialog is not showing on the screen.ComponentLookupException - if a pop-up menu cannot be found.public void close()
Dialog.Copyright © 2007-2012 FEST (Fixtures for Easy Software Testing). All Rights Reserved.