Jump to: navigation, search


< SWTBot
Revision as of 13:02, 16 July 2009 by Wwalker3.austin.rr.com (Talk | contribs) (Troubleshooting)

Update Sites
Mailing List
Open Bugzilla tickets
Open Gerrit reviews
Browse Source
Continuous Integration


SWTBot fails with"swtbottestapplication" could not be found in the registry

If you get an error like:

java.lang.RuntimeException: Application "org.eclipse.swtbot.eclipse.core.swtbottestapplication" could not be found in the registry.
The applications available are: some.long.list.of.application.ids

Then the most common cause is that the target platform does not have the "org.eclipse.swtbot.eclipse.core" plugin. If you're certain that you have this plugin, but the error persists. Try running with -consoleLog -debug options turned on while running the tests. This would most probably tell you about a missing dependency that causes the plugin to not load.

WidgetNotFoundException when stepping through SWTBot test in Eclipse debugger

If you set a debugger breakpoint in an SWTBot test and then step through it, you may see a WidgetNotFoundException from an SWTBot call that should easily succeed, like

SWTWorkbenchBot bot = new SWTWorkbenchBot();
bot.viewByTitle( "MyView" )

This is because when the debugger is in focus, your application is out of focus, which prevents SWTBot from finding its widgets. To fix this problem, just be sure to set any breakpoints after the SWTBot calls you're interested in, and don't expect to be able to step across subsequent SWTBot calls.