Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » SWTBot » Accessing views using SWTBot
Accessing views using SWTBot [message #1070325] Wed, 17 July 2013 18:42 Go to next message
Bruno Santos is currently offline Bruno SantosFriend
Messages: 2
Registered: July 2013
Junior Member
I'm using latest Kepler and SWTBot in order to test a plugin.

How do I find a view (e.g. Welcome dashboard and close it) using SWTBot()?

Note: I had a first version of the test that made use SWTWorkbenchBot which fails to work with maven tycho-surefire-plugin even though it works just fine when launched from "Run As" -> "SWTBot Test".

Any ideas of how I can get access to a view using SWTBot?
Re: Accessing views using SWTBot [message #1071194 is a reply to message #1070325] Fri, 19 July 2013 14:30 Go to previous message
Bruno Santos is currently offline Bruno SantosFriend
Messages: 2
Registered: July 2013
Junior Member
Got it!

I was missing the eclipse SDK group in the tycho plguin. For the plugin devs newbies like me, here is what you should have in the tycho plugin:

<packaging>eclipse-test-plugin</packaging>
	<build>
		<plugins>
			<plugin>
				<groupId>org.eclipse.tycho</groupId>
				<artifactId>tycho-surefire-plugin</artifactId>
				<version>${tycho-version}</version>
				<configuration>
					<useUIHarness>true</useUIHarness>
					<useUIThread>false</useUIThread>
					<product>org.eclipse.sdk.ide</product>
					<application>org.eclipse.ui.ide.workbench</application>
					<dependencies>
						<dependency>
							<type>eclipse-feature</type>
							<artifactId>com.my.plugin.feature</artifactId>
						</dependency>
						<dependency>
							<type>p2-installable-unit</type>
							<artifactId>org.eclipse.sdk.feature.group</artifactId>
						</dependency>
					</dependencies>
				</configuration>
			</plugin>
		</plugins>


With the "org.eclipse.sdk.feature.group", the SWTWorkbenchBot based tests will work just fine.
Previous Topic:Require-Bundle org.hamcrest
Next Topic:How to access text field in global toolbar
Goto Forum:
  


Current Time: Thu Dec 18 09:48:01 GMT 2014

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

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