Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » SWTBot » Having trouble with buttons on Console view toolbar
Having trouble with buttons on Console view toolbar [message #527052] Tue, 13 April 2010 20:02 Go to next message
Jeff Johnston is currently offline Jeff JohnstonFriend
Messages: 215
Registered: July 2009
Senior Member
For my plugin that I am testing, there ends up being multiple consoles created. There is a button on the Console toolbar which looks like a TV set. The button has a down arrow on the right-hand side of the button. When pushed, a list drops down and the user can select one of the choices which have radio buttons in front. If one clicks to the left side, it simply cycles through the list, one at a time. There is a similar button next to it which shows the various consoles.

The problem is that I can't figure out how to access this button. The spy doesn't show anything but toolbar for the button and when clicked, it shows nothing when hovering over the list items. I have no idea how one would access the right side of the button surface for such testing.

I tried toolbarButton(), toolbarRadioButton(), and toolbarDropDownButton(), but none of these are found for the console view.

Any ideas?

I have a picture posted at http://profile.imageshack.us/user/jjohnstn/
Re: Having trouble with buttons on Console view toolbar [message #531726 is a reply to message #527052] Wed, 05 May 2010 22:36 Go to previous message
Jeff Johnston is currently offline Jeff JohnstonFriend
Messages: 215
Registered: July 2009
Senior Member
The following snippet gets me the menu item I am interested in, however, I can't get the menu to close after selection. There is a comment in the menuItem() interface that the menu remains open until clicked, but I can't seem to do this programmatically, only using the mouse manually is able to click on the menu and close it. Is this the expected behavior and if yes, are there any plans to fix this in a future version?

		SWTBotView consoleView = bot.viewByTitle("Console");
		consoleView.setFocus();
		SWTBotToolbarDropDownButton b = consoleView.toolbarDropDownButton("Display Selected Console");
		Matcher<MenuItem> regexMatcher = withRegex(".*Configure.*");
		SWTBotMenu item = b.menuItem(regexMatcher);
		item.setFocus();
		item.click();
Previous Topic:Headless junit4 runner can't find my plug-in
Next Topic:Assert failed trying to navigate a tree
Goto Forum:
  


Current Time: Thu Apr 25 07:54:17 GMT 2024

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

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

Back to the top