Hi,
While working with SWTBot tool on some eclipse GUI testing I have noticed a problem to access some of eclipse controls, like buttons on Package Explore view. The problem is access to a button "View Menu" (where I need to change presentation mode of Package Explorer to Hierarchical, tried somthing like: SWTWorkbenchBot bot = new SWTWorkbenchBot();
SWTBotView packView = bot.viewByTitle("Package Explorer");
SWTBot packBot = packageExplorer.bot();
packBot.toolbarButtonWithTooltip("View Menu").click();
and bot.toolbarButtonWithTooltip("View Menu").click();
or bot.toolbarDropDownButtonWithTooltip("View Menu").click();
but neither one was successful. Also button "Link to Editor" is problem. I only manged to access button Collapse All and nothing else:
bot.toolbarButtonWithTooltip("Collapse All (Shift+Ctrl+Numpad_Divide)").click();
Also I had a problem to access context menu Source -> Clean Up by:
editor = bot.editorByTitle(CLASS_FILE_NAME).toTextEditor();
editor.contextMenu("&Source").menu("Clean &Up...").click();
There was widget not found exception. Does anybody have/had same problems and have some solution?
*Related to problem with buttons on Package Explorer: those options can be accessed through:
packageExplorer.menu("&Hierarchical").click();
or
packageExplorer.menu("&Flat").click();
And Clean Up.. option could be activated through:
editor.pressShortcut(SWT.SHIFT, SWT.ALT, 'S');
bot.menu("Clean &Up...").click();
when code for clean up is in active editor.
[Updated on: Thu, 17 November 2011 15:50]
Report message to a moderator