|Re: Generating SWT.Arm events with SWTbot? [message #34171 is a reply to message #34103]
||Fri, 01 May 2009 03:58
| Ketan Padegaonkar
Registered: July 2009
Arm events is not supported on SWTBot. Please open a bug with a sample
of how you'd like the SWTBot api that deals with arm events to look like.
As a workaround, you can invoke the event on the widget directly as well:
menuItem = bot.contextMenu("foo").widget;
On 28/4/09 20:07, Thomas Hanselman wrote:
> Is it possible to make SWTbot generate SWT.Arm events on a context menu?
> In the application I am working on, we have a view that extends the
> Common Navigator Framework. We use a CommonActionProvider to add context
> menus to certain elements in the view.
> We've "attached" tooltips to the MenuItems in the context menu following
> the general pattern described here:
> http://dev.eclipse.org/newslists/news.eclipse.platform.swt/m sg35542.html. We
> use a show listener to add an arm listener to each MenuItem, and the arm
> listener is what displays the tooltip.
> I tried to write a SWTbot test that verifies that the tooltip shows the
> correct text, but I discovered that SWTbot does not appear to generate
> the SWT.Arm events necessary to get the tooltip to show.
> I am using Eclipse 3.3.2, and SWTBot 2 (build 110.) I am able to trigger
> the context menu with code like this:
> SWTBotMenu contextMenu = myTreeItem.contextMenu("Menu");
> but the widgetArmed() event in the ArmListener I register never gets
> called when the SWTbot test runs.
> Is it possible to generate these events with the 110 build of SWTbot, or
> do wI need to get a newer version?
Powered by FUDForum
. Page generated in 0.01802 seconds