@InternalApi public class JMenuItemDriver extends JComponentDriver
Supports functional testing of JMenuItems.
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 |
|---|
JMenuItemDriver(Robot robot)
Creates a new
JMenuItemDriver. |
| Modifier and Type | Method and Description |
|---|---|
void |
click(Component c)
Simulates a user clicking once the given AWT or Swing
Component using the left mouse button. |
void |
click(JMenuItem menuItem)
Finds and selects the given
JMenuItem. |
clientProperty, invokeAction, isVisible, isVisible, requireToolTip, requireToolTip, scrollToVisibledoResizeHeight, doResizeWidth, isResizable, move, resizebackgroundOf, checkInEdtEnabledAndShowing, click, click, click, click, doubleClick, drag, dragOver, drop, focus, focusAndWaitForFocusGain, fontOf, foregroundOf, invokePopupMenu, invokePopupMenu, moveMouseIgnoringAnyError, moveMouseIgnoringAnyError, performAccessibleActionOf, pressAndReleaseKey, pressAndReleaseKey, pressAndReleaseKeys, pressKey, propertyName, releaseKey, requireDisabled, requireEnabled, requireEnabled, requireFocused, requireNotVisible, requireSize, requireVisible, rightClick, settings, waitForShowingpublic JMenuItemDriver(@Nonnull Robot robot)
JMenuItemDriver.robot - the robot to use to simulate user input.public void click(Component c)
ComponentDriverComponent using the left mouse button.click in class ComponentDriverc - the Component to click on.@RunsInEDT public void click(@Nonnull JMenuItem menuItem)
JMenuItem.menuItem - the JMenuItem to select.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 © 2014 AssertJ. All rights reserved.