Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » SWTBot » How to click on toolbar dropdown menu item using SWTBOT
How to click on toolbar dropdown menu item using SWTBOT [message #1033456] Thu, 04 April 2013 08:42 Go to next message
Amruta L is currently offline Amruta L
Messages: 1
Registered: April 2013
Junior Member
I am trying to automate the functional testcase of RCP application which requirs to click on menu item from the toolbar dropdown menu. I tried below snippet but it didn't worked, it just clicked on the dropdown menu but menuItems are not getting displayed. Same things works correctly when exeuted manually.


SWTBotToolbarDropDownButton myDropdown = getBot().toolbarDropDownButtonWithTooltip( "My Dropdown" );
SWTBotMenu showMenuItem = myDropdown.menuItem( "Show" );
showMenuItem.click();


This is how the dropdown menu in view toolbar
index.php/fa/14232/0/

and menu items in this menu are
index.php/fa/14233/0/

But when executing the SWTBOT testcase to click 'Show' menu item using above code I am getting the dropdown menu as
index.php/fa/14238/0/

Can some one suggest what might be wrong in above code or is there other way to do this ?


Thanks
Amruta
Re: How to click on toolbar dropdown menu item using SWTBOT [message #1037071 is a reply to message #1033456] Tue, 09 April 2013 06:27 Go to previous message
Mickael Istria is currently offline Mickael Istria
Messages: 765
Registered: July 2009
Location: Grenoble, France
Senior Member
On 04/05/2013 09:19 PM, Amruta L wrote:
> I am trying to automate the functional testcase of RCP application which requirs to click on menu item from the toolbar dropdown menu. I tried below snippet but it didn't worked, it just clicked on the dropdown menu but menuItems are not getting displayed. Same things works correctly when exeuted manually.

Is you application based on Eclipse 4.x ? I think you are hitting this
bug: https://bugs.eclipse.org/bugs/show_bug.cgi?id=388306
A change in implementation of menus in Eclipse 4 makes that the sequence
of events generated by SWTBot for some menus does not populate the menu.

I'd really glad if you could have a look to this bug, and maybe provide
a patch or any contribution that would help to get it fixed.

Cheers,
--
Mickael Istria
JBoss, by Red Hat
My blog: http://mickaelistria.wordpress.com
My Tweets: http://twitter.com/mickaelistria
Previous Topic:SWTBot 2.1.0 released
Next Topic:SWTBOT - WINDOWS - Jenkins - Eclipse losing focus
Goto Forum:
  


Current Time: Sun Oct 26 03:13:31 GMT 2014

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

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