Skip to main content



      Home
Home » Eclipse Projects » SWTBot » Unable to instantiate SWTWorkbenchBot in Eclipse E4
Unable to instantiate SWTWorkbenchBot in Eclipse E4 [message #1512091] Mon, 15 December 2014 07:46 Go to next message
Eclipse UserFriend
Hi,

I want to test Eclipse RCP 4 application which I currently migrate from Eclipse RCP 3. I use SWTBot plugin. I have to use SWTWorkbenchBot for setting perspective which is in the plugin org.eclipse.swtbot.e4.finder. Before using this class, I used the same class but for Eclipse 3 which is in the plugin org.eclipse.swtbot.eclipse.finder.

But I can't initialize by injection the IEclipseContext attribute of the SWTWorkbenchBot. So are there a method for doing it?

Or maybe, there is a way for testing Eclipse 4 RCP applications with org.eclipse.swtbot.eclipse ?

Thanks in advance,
Loic
Re: Unable to instantiate SWTWorkbenchBot in Eclipse E4 [message #1513369 is a reply to message #1512091] Tue, 16 December 2014 08:15 Go to previous messageGo to next message
Eclipse UserFriend
How do you run your test?
--
Mickael Istria
My job: http://www.jboss.org/tools
My blog: http://mickaelistria.wordpress.com
My Tweets: http://twitter.com/mickaelistria
Re: Unable to instantiate SWTWorkbenchBot in Eclipse E4 [message #1591190 is a reply to message #1513369] Thu, 29 January 2015 06:22 Go to previous messageGo to next message
Eclipse UserFriend
Bit of a late response, but we use this in all our test classes where Activator.class is the Activator of your plugin being tested.


	protected static IEclipseContext getEclipseContext() {
		final IEclipseContext serviceContext = EclipseContextFactory.getServiceContext(FrameworkUtil.getBundle(Activator.class).getBundleContext());
		return serviceContext.get(IWorkbench.class).getApplication().getContext();
	}
Re: Unable to instantiate SWTWorkbenchBot in Eclipse E4 [message #1690989 is a reply to message #1591190] Wed, 01 April 2015 08:55 Go to previous message
Eclipse UserFriend
Sorry for the very late response, i was not notified when you repsonded and I resolved the problem by updating some of the tests which were on eclipse 3.x style and that worked.
Thanks for the answers, I will use what you said Matt when I will not be able to continue testing with swtbot 3x.
Previous Topic:Robotframework tool using SWTBot
Next Topic:Assert the text inside the MessageDialog
Goto Forum:
  


Current Time: Sat May 17 17:05:39 EDT 2025

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

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

Back to the top