public class JPopupMenuDriver extends JComponentDriver
JPopupMenu
s:
org.fest.swing.fixture
in your tests.robot
Constructor and Description |
---|
JPopupMenuDriver(Robot robot)
Creates a new
JPopupMenuDriver . |
Modifier and Type | Method and Description |
---|---|
JMenuItem |
menuItem(JPopupMenu popupMenu,
GenericTypeMatcher<? extends JMenuItem> matcher)
|
JMenuItem |
menuItem(JPopupMenu popupMenu,
String name)
|
String[] |
menuLabelsOf(JPopupMenu popupMenu)
Returns the contents of the pop-up menu as a
String array. |
clientProperty, invokeAction, isVisible, isVisible, requireToolTip, requireToolTip, scrollToVisible
move, resize, resizeHeight, resizeWidth
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
public JPopupMenuDriver(Robot robot)
JPopupMenuDriver
.robot
- the robot to use to simulate user input.@RunsInEDT public String[] menuLabelsOf(JPopupMenu popupMenu)
String
array.popupMenu
- the target JPopupMenu
.String
array.@RunsInEDT public JMenuItem menuItem(JPopupMenu popupMenu, String name)
popupMenu
- the target JPopupMenu
.name
- the name to match.JMenuItem
found.ComponentLookupException
- if a JMenuItem
having a matching name could not be found.ComponentLookupException
- if more than one JMenuItem
having a matching name is found.public JMenuItem menuItem(JPopupMenu popupMenu, GenericTypeMatcher<? extends JMenuItem> matcher)
popupMenu
- the target JPopupMenu
.matcher
- contains the search criteria for finding a JMenuItem
.JMenuItem
found.ComponentLookupException
- if a JMenuItem
that matches the given search criteria could not be
found.ComponentLookupException
- if more than one JMenuItem
that matches the given search criteria
is found.Copyright © 2007-2013 FEST (Fixtures for Easy Software Testing). All Rights Reserved.