Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

SWTBot/Troubleshooting

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


SWTBot
Website
Update Sites
Community
Mailing List
Forums/Newsgroups
IRC
Contribute
Open Bugzilla tickets
Open Gerrit reviews
Browse Source
Continuous Integration


Troubleshooting

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.

Back to the top