org.eclipse.swtbot.swt.finder.widgets
Class SWTBotMenu
java.lang.Object
org.eclipse.swtbot.swt.finder.widgets.AbstractSWTBot<MenuItem>
org.eclipse.swtbot.swt.finder.widgets.SWTBotMenu
public class SWTBotMenu
- extends AbstractSWTBot<MenuItem>
- Version:
- $Id$
- Author:
- Ketan Padegaonkar <KetanPadegaonkar [at] gmail [dot] com>
Methods inherited from class org.eclipse.swtbot.swt.finder.widgets.AbstractSWTBot |
absoluteLocation, assertEnabled, asyncExec, backgroundColor, click, clickXY, contextMenu, contextMenu, createEvent, createMouseEvent, createSelectionEvent, doubleClickXY, foregroundColor, getId, getText, getToolTipText, hasStyle, isActive, isEnabledInternal, isVisible, keyboard, notify, notify, notify, pressShortcut, pressShortcut, pressShortcut, rightClick, rightClick, setFocus, sleep, syncExec, syncExec, syncExec, syncExec, syncExec, syncExec, syncExec, syncExec, toString, traverse, waitForEnabled |
SWTBotMenu
public SWTBotMenu(MenuItem w,
SelfDescribing description)
throws WidgetNotFoundException
- Parameters:
w
- the widget.description
- the description of the widget, this will be reported by AbstractSWTBot.toString()
- Throws:
WidgetNotFoundException
- if the widget is null
or widget has been disposed.
SWTBotMenu
public SWTBotMenu(MenuItem w)
throws WidgetNotFoundException
- Parameters:
w
- the widget.
- Throws:
WidgetNotFoundException
- if the widget is null
or widget has been disposed.
click
public SWTBotMenu click()
- Clicks on the menu item
- Overrides:
click
in class AbstractSWTBot<MenuItem>
- Returns:
- itself.
menu
public SWTBotMenu menu(String menuName)
throws WidgetNotFoundException
- Gets the menu matching the given name.
- Parameters:
menuName
- the name of the menu item that is to be found
- Returns:
- the first menu that matches the menuName
- Throws:
WidgetNotFoundException
- if the widget is not found.
isEnabled
public boolean isEnabled()
- Description copied from class:
AbstractSWTBot
- Gets if the object's widget is enabled.
- Overrides:
isEnabled
in class AbstractSWTBot<MenuItem>
- Returns:
true
if the widget is enabled.- See Also:
Control.isEnabled()
isChecked
public boolean isChecked()
- Gets if this menu item is checked.
- Returns:
true
if the menu is checked, false
otherwise.- Since:
- 1.2
- See Also:
MenuItem.getSelection()