Skip to main content



      Home
Home » Eclipse Projects » SWTBot » How to click menu items in SWTBOT
How to click menu items in SWTBOT [message #1081372] Wed, 07 August 2013 02:32 Go to next message
Eclipse UserFriend
I have a editor toolbar where there is a SWTBotToolbarDropDownButton which further drops down to two Export Options.I want to click both these options one by one.For clicking the first option I had used the code:-

SWTBotToolbarDropDownButton button = dmdEditor.bot().toolbarDropDownButton(); assertNotNull(button);
button.click().menuItem("Export to MS Visio").click();
But this reports WidgetNotFoundException.
Please check this attached image and suggest me the code for clicking these dropdown options in SWTBOT.
  • Attachment: ExportImg.bmp
    (Size: 32.40KB, Downloaded 394 times)
Re: How to click menu items in SWTBOT [message #1090060 is a reply to message #1081372] Mon, 19 August 2013 12:57 Go to previous messageGo to next message
Eclipse UserFriend
On 08/07/2013 08:32 AM, Alok Dwivedi wrote:
> I have a editor toolbar where there is a SWTBotToolbarDropDownButton which further drops down to two Export Options.I want to click both these options one by one.For clicking the first option I had used the code:-
>
> SWTBotToolbarDropDownButton button = dmdEditor.bot().toolbarDropDownButton(); assertNotNull(button);
> button.click().menuItem("Export to MS Visio").click();
> But this reports WidgetNotFoundException.

When do you get this exception? When getting the button, or when getting
the menu?


--
Mickael Istria
JBoss, by Red Hat
My blog: http://mickaelistria.wordpress.com
My Tweets: http://twitter.com/mickaelistria
Re: How to click menu items in SWTBOT [message #1090610 is a reply to message #1090060] Tue, 20 August 2013 07:54 Go to previous messageGo to next message
Eclipse UserFriend
The exception occurred while finding the menu item.
Re: How to click menu items in SWTBOT [message #1173254 is a reply to message #1090610] Wed, 06 November 2013 06:48 Go to previous message
Eclipse UserFriend
This should work:
bot.toolbarDropDownButton().menuItem("Export to MS Visio").click();
bot.toolbarDropDownButton().menuItem("Export to Image").click();
Previous Topic:How to click a button until the condition is true.?
Next Topic:"Validation" and "Error Markers" behave strange when testing
Goto Forum:
  


Current Time: Wed Jul 23 15:53:41 EDT 2025

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

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

Back to the top