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 LFriend
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 messageGo to next message
Mickael Istria is currently offline Mickael IstriaFriend
Messages: 820
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
Re: How to click on toolbar dropdown menu item using SWTBOT [message #1758589 is a reply to message #1037071] Thu, 30 March 2017 11:16 Go to previous message
Gunnar Wagenknecht is currently offline Gunnar WagenknechtFriend
Messages: 484
Registered: July 2009
Location: San Francisco ✈ Germany
Senior Member

Is there a trick to close the shell that has been opened by the toolbar drop down button? I tried ESC but probably at the wrong location.
Previous Topic:Execute SWTBot in running IDE
Goto Forum:
  


Current Time: Thu Mar 30 16:55:48 GMT 2017

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

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