org.fest.swing.driver
Class JMenuItemDriver
java.lang.Object
org.fest.swing.driver.ComponentDriver
org.fest.swing.driver.ContainerDriver
org.fest.swing.driver.JComponentDriver
org.fest.swing.driver.JMenuItemDriver
public class JMenuItemDriver
- extends JComponentDriver
Understands functional testing of JMenuItems:
- user input simulation
- state verification
- property value query
This class is intended for internal use only. Please use the classes in the package
org.fest.swing.fixture in your tests.
- Author:
- Alex Ruiz, Yvonne Wang
| Methods 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 |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
JMenuItemDriver
public JMenuItemDriver(Robot robot)
- Creates a new
JMenuItemDriver.
- Parameters:
robot - the robot to use to simulate user input.
click
@RunsInEDT
public void click(JMenuItem menuItem)
- Finds and selects the given
JMenuItem.
- Parameters:
menuItem - the JMenuItem to select.
- Throws:
IllegalStateException - if the menu to select is disabled.
IllegalStateException - if the menu to select is not showing on the screen.
ActionFailedException - if the menu has a pop-up and it fails to show up.
Copyright © 2007-2010 FEST (Fixtures for Easy Software Testing). All Rights Reserved.