Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » SWTBot » Toolbar with Dropdown Items via ExtensionPoint
Toolbar with Dropdown Items via ExtensionPoint [message #777985] Wed, 11 January 2012 08:52
Dominik Missing name is currently offline Dominik Missing name
Messages: 7
Registered: November 2010
Junior Member
Hi,

I have created a Dropdown-Toolbar using the Extension-Points of the Plugin.

Now in my test I try to click on a menu-item via
Code:
1: SWTWorkbenchBot bot= new SWTWorkbenchBot();
2: SWTBotToolbarDropDownButton toolbarDropDownButton = bot.toolbarDropDownButton("Convert");
3: toolbarDropDownButton.menuItem("to Analog").click();
4: bot.sleep(5000);

and get a WidgetNotFoundException at line 3:
org.eclipse.swtbot.finder.SWTBotFactory.waitUntilWidgetAppears

In the end, the bot has not opened the dropDownMenu.
So I understand, that he canĀ“t find the MenuItem.
My question is, why the bot does not expand/open the dropDownMenu.
If I create the DropDownToolbar programmatically (not as a Extension-Point), it works fine.

Has anyone an idea, what I am doing wrong?

Regards,
Dominik

Details:
I am working with SWTBot 2.0.5
and the
plugin.xml looks like this:
...
<extension point="org.eclipse.ui.menus">
<menuContribution locationURI="toolbar:de.industronic.configtool.stations.view.edit">
<command commandId="de.industronic.configtool.stations.convert.station" label="Convert" style="pulldown">
</command>
</menuContribution>

<menuContribution
allPopups="true"
locationURI="menu:de.industronic.configtool.stations.convert.station">
<command commandId="de.industronic.configtool.stations.convert.station" label="to Analog" style="push">
<parameter name="de.industronic.configtool.stations.convert.totype" value="analog">
</parameter>
</command>
<command commandId="de.industronic.configtool.stations.convert.station" label="to Digital" style="push">
<parameter name="de.industronic.configtool.stations.convert.totype" value="digital">
</parameter>
</command>
</menuContribution>
</extension>
...
Previous Topic:ComboBox in Popup window
Next Topic:Using EclipseSpy View location to find widgets
Goto Forum:
  


Current Time: Wed Oct 01 04:05:35 GMT 2014

Powered by FUDForum. Page generated in 0.03893 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software