Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » SWTBot » SWTBot test wizard without workbench(SWTBot test wizard without workbench)
icon5.gif  SWTBot test wizard without workbench [message #999155] Fri, 11 January 2013 13:18
christin nitsche is currently offline christin nitscheFriend
Messages: 1
Registered: January 2013
Junior Member
I created an eclipse wizard which i want to test now with the SWTBot. I already used the SWTWorkbenchBot which finally works but i want to test the wizard now without the eclipse workbench. Thats why i created a shell in my testclass where i want to put on my wizardpage, but all i could see, was a empty shell without my wizardPage.

So i created a new shell class which included this code:

	public static void main(String args[]) {
		try {
			Display display = Display.getDefault();
			HorrorShell shell = new HorrorShell(display);;
			while (!shell.isDisposed()) {
				if (!display.readAndDispatch()) {
		catch (Exception e) {

	 * Create the shell.
	 * @param display
	public HorrorShell(Display display) {
		super(display, SWT.SHELL_TRIM);
		setLayout(new FillLayout());


	 * Create contents of the shell.
	protected void createContents() {
		setText("SWT Application");
		setSize(450, 300);
		ManualSettingsWizardPage page = new ManualSettingsWizardPage();

With the shell class it works, my wizardpage was shown but if i try to run my testclass as SWTBotTest or as JUnitTest it wont show me anything but a empty shell.
Here's the code in my testclass:

private ManualSettingsWizardPage wizard;
	private SWTBotShell botShell;
	private Shell shell;
	private Display display;
        private SWTBot bot;

	public void setUp() {

		botShell = new SWTBotShell(shell);
		bot = new SWTBot();
		wizard = new ManualSettingsWizardPage();

		display = Display.getDefault();
		shell = new Shell(display);;


	public void bot() throws Exception {
		bot =;
		shell.setBounds(200, 200, 400, 400);
		shell.setLayout(new FillLayout());


Previous Topic:"Widget is disposed" when TreeColumnLayout is running
Next Topic:Do you want a recorder for SWTBot ?
Goto Forum:

Current Time: Sun Oct 04 09:15:37 GMT 2015

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

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