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();
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();
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:
And Clean Up.. option could be activated through:
editor.pressShortcut(SWT.SHIFT, SWT.ALT, 'S');
when code for clean up is in active editor.
[Updated on: Thu, 17 November 2011 10:50]
Report message to a moderator