[jbosstools-commits] JBoss Tools SVN: r42883 - in branches/jbosstools-3.3.x/tests/plugins/org.jboss.tools.ui.bot.ext: META-INF and 11 other directories.

jbosstools-commits at lists.jboss.org jbosstools-commits at lists.jboss.org
Tue Aug 7 10:01:54 EDT 2012


Author: mmalina
Date: 2012-08-07 10:01:52 -0400 (Tue, 07 Aug 2012)
New Revision: 42883

Added:
   branches/jbosstools-3.3.x/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/condition/ViewIsActive.java
   branches/jbosstools-3.3.x/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/entity/XMLConfiguration.java
   branches/jbosstools-3.3.x/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/helper/SubversiveHelper.java
   branches/jbosstools-3.3.x/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/view/PaletteView.java
Modified:
   branches/jbosstools-3.3.x/tests/plugins/org.jboss.tools.ui.bot.ext/
   branches/jbosstools-3.3.x/tests/plugins/org.jboss.tools.ui.bot.ext/META-INF/MANIFEST.MF
   branches/jbosstools-3.3.x/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/RequirementAwareSuite.java
   branches/jbosstools-3.3.x/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/SWTJBTExt.java
   branches/jbosstools-3.3.x/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/SWTUtilExt.java
   branches/jbosstools-3.3.x/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/requirement/AddServer.java
   branches/jbosstools-3.3.x/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/helper/ContentAssistHelper.java
   branches/jbosstools-3.3.x/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/helper/KeyboardHelper.java
   branches/jbosstools-3.3.x/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/logging/LogWidgetsVisitor.java
   branches/jbosstools-3.3.x/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/matcher/console/ConsoleOutputMatcher.java
   branches/jbosstools-3.3.x/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/parts/ContentAssistBot.java
   branches/jbosstools-3.3.x/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/parts/SWTBotBrowserExt.java
   branches/jbosstools-3.3.x/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/parts/SWTBotFormTextExt.java
   branches/jbosstools-3.3.x/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/parts/SWTBotHyperlinkExt.java
   branches/jbosstools-3.3.x/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/parts/SWTBotTwistie.java
   branches/jbosstools-3.3.x/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/types/IDELabel.java
   branches/jbosstools-3.3.x/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/view/ErrorLogView.java
   branches/jbosstools-3.3.x/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/view/ExplorerBase.java
   branches/jbosstools-3.3.x/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/view/ServersView.java
   branches/jbosstools-3.3.x/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/view/ViewBase.java
   branches/jbosstools-3.3.x/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/wizards/SWTBotWizard.java
Log:
Updated bot ext with updates from trunk.


Property changes on: branches/jbosstools-3.3.x/tests/plugins/org.jboss.tools.ui.bot.ext
___________________________________________________________________
Added: svn:mergeinfo
   + /trunk/tests/plugins/org.jboss.tools.ui.bot.ext:41456-42878

Modified: branches/jbosstools-3.3.x/tests/plugins/org.jboss.tools.ui.bot.ext/META-INF/MANIFEST.MF
===================================================================
--- branches/jbosstools-3.3.x/tests/plugins/org.jboss.tools.ui.bot.ext/META-INF/MANIFEST.MF	2012-08-07 13:37:43 UTC (rev 42882)
+++ branches/jbosstools-3.3.x/tests/plugins/org.jboss.tools.ui.bot.ext/META-INF/MANIFEST.MF	2012-08-07 14:01:52 UTC (rev 42883)
@@ -1,60 +1,60 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: Ext
-Bundle-SymbolicName: org.jboss.tools.ui.bot.ext
-Bundle-Version: 3.2.0.qualifier
-Bundle-ClassPath: .,
- resources/drv/hsqldb.jar
-Bundle-Activator: org.jboss.tools.ui.bot.ext.Activator
-Export-Package: 
- org.jboss.tools.ui.bot.ext,
- org.jboss.tools.ui.bot.ext.condition,
- org.jboss.tools.ui.bot.ext.config,
- org.jboss.tools.ui.bot.ext.config.requirement,
- org.jboss.tools.ui.bot.ext.entity,
- org.jboss.tools.ui.bot.ext.gef,
- org.jboss.tools.ui.bot.ext.gen,
- org.jboss.tools.ui.bot.ext.generator,
- org.jboss.tools.ui.bot.ext.helper,
- org.jboss.tools.ui.bot.ext.logging,
- org.jboss.tools.ui.bot.ext.matcher,
- org.jboss.tools.ui.bot.ext.matcher.console,
- org.jboss.tools.ui.bot.ext.parts,
- org.jboss.tools.ui.bot.ext.types,
- org.jboss.tools.ui.bot.ext.view,
- org.jboss.tools.ui.bot.ext.widgets,
- org.jboss.tools.ui.bot.ext.wizards,
- org.jboss.tools.ui.bot.ext.zest
-Require-Bundle: org.eclipse.ui,
- org.eclipse.core.runtime,
- org.eclipse.swtbot.eclipse.core;bundle-version="2.0.0",
- org.eclipse.swtbot.eclipse.finder;bundle-version="2.0.0",
- org.eclipse.swtbot.junit4_x;bundle-version="2.0.0",
- org.eclipse.swtbot.swt.finder;bundle-version="2.0.0",
- org.hamcrest;bundle-version="1.1.0",
- org.apache.log4j;bundle-version="1.2.13",
- org.eclipse.datatools.connectivity;bundle-version="1.1.2",
- org.eclipse.datatools.connectivity.db.generic;bundle-version="1.0.1",
- org.eclipse.ui.ide;bundle-version="3.5.1",
- org.eclipse.ui.forms;bundle-version="3.4.1",
- org.junit4;bundle-version="4.5.0",
- org.eclipse.jdt.core;bundle-version="3.5.0",
- org.eclipse.ui.editors;bundle-version="3.5.0",
- org.eclipse.core.resources;bundle-version="3.5.0",
- org.eclipse.draw2d;bundle-version="3.6.1",
- org.eclipse.zest.core;bundle-version="1.2.0",
- org.eclipse.zest.layouts;bundle-version="1.1.0",
- org.eclipse.swtbot.eclipse.gef.finder;bundle-version="2.0.0",
- org.eclipse.gef;bundle-version="3.6.1",
- org.eclipse.ui,
- org.eclipse.core.runtime,
- org.eclipse.ui,
- org.eclipse.core.runtime,
- org.eclipse.ui,
- org.eclipse.core.runtime,
- org.eclipse.swtbot.forms.finder
-Bundle-RequiredExecutionEnvironment: JavaSE-1.6
-Bundle-ActivationPolicy: lazy
-Import-Package: org.eclipse.gef,
- org.jboss.tools.ui.bot.ext.helper
-Eclipse-RegisterBuddy: org.apache.log4j
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: Ext
+Bundle-SymbolicName: org.jboss.tools.ui.bot.ext
+Bundle-Version: 3.2.0.qualifier
+Bundle-ClassPath: .,
+ resources/drv/hsqldb.jar
+Bundle-Activator: org.jboss.tools.ui.bot.ext.Activator
+Export-Package: 
+ org.jboss.tools.ui.bot.ext,
+ org.jboss.tools.ui.bot.ext.condition,
+ org.jboss.tools.ui.bot.ext.config,
+ org.jboss.tools.ui.bot.ext.config.requirement,
+ org.jboss.tools.ui.bot.ext.entity,
+ org.jboss.tools.ui.bot.ext.gef,
+ org.jboss.tools.ui.bot.ext.gen,
+ org.jboss.tools.ui.bot.ext.generator,
+ org.jboss.tools.ui.bot.ext.helper,
+ org.jboss.tools.ui.bot.ext.logging,
+ org.jboss.tools.ui.bot.ext.matcher,
+ org.jboss.tools.ui.bot.ext.matcher.console,
+ org.jboss.tools.ui.bot.ext.parts,
+ org.jboss.tools.ui.bot.ext.types,
+ org.jboss.tools.ui.bot.ext.view,
+ org.jboss.tools.ui.bot.ext.widgets,
+ org.jboss.tools.ui.bot.ext.wizards,
+ org.jboss.tools.ui.bot.ext.zest
+Require-Bundle: org.eclipse.ui,
+ org.eclipse.core.runtime,
+ org.eclipse.swtbot.eclipse.core;bundle-version="2.0.0",
+ org.eclipse.swtbot.eclipse.finder;bundle-version="2.0.0",
+ org.eclipse.swtbot.junit4_x;bundle-version="2.0.0",
+ org.eclipse.swtbot.swt.finder;bundle-version="2.0.0",
+ org.hamcrest;bundle-version="1.1.0",
+ org.apache.log4j;bundle-version="1.2.13",
+ org.eclipse.datatools.connectivity;bundle-version="1.1.2",
+ org.eclipse.datatools.connectivity.db.generic;bundle-version="1.0.1",
+ org.eclipse.ui.ide;bundle-version="3.5.1",
+ org.eclipse.ui.forms;bundle-version="3.4.1",
+ org.junit4;bundle-version="4.5.0",
+ org.eclipse.jdt.core;bundle-version="3.5.0",
+ org.eclipse.ui.editors;bundle-version="3.5.0",
+ org.eclipse.core.resources;bundle-version="3.5.0",
+ org.eclipse.draw2d;bundle-version="3.6.1",
+ org.eclipse.zest.core;bundle-version="1.2.0",
+ org.eclipse.zest.layouts;bundle-version="1.1.0",
+ org.eclipse.swtbot.eclipse.gef.finder;bundle-version="2.0.0",
+ org.eclipse.gef;bundle-version="3.6.1",
+ org.eclipse.ui,
+ org.eclipse.core.runtime,
+ org.eclipse.ui,
+ org.eclipse.core.runtime,
+ org.eclipse.ui,
+ org.eclipse.core.runtime,
+ org.eclipse.swtbot.forms.finder
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6
+Bundle-ActivationPolicy: lazy
+Import-Package: org.eclipse.gef,
+ org.jboss.tools.ui.bot.ext.helper
+Eclipse-RegisterBuddy: org.apache.log4j

Modified: branches/jbosstools-3.3.x/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/RequirementAwareSuite.java
===================================================================
--- branches/jbosstools-3.3.x/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/RequirementAwareSuite.java	2012-08-07 13:37:43 UTC (rev 42882)
+++ branches/jbosstools-3.3.x/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/RequirementAwareSuite.java	2012-08-07 14:01:52 UTC (rev 42883)
@@ -123,7 +123,9 @@
 			this.config = config;
 
 			try {
-				filter(categoryFilter);
+				if (categoryFilter != null){
+					filter(categoryFilter);					
+				}
 			} catch (NoTestsRemainException e) {
 				// TODO Auto-generated catch block
 				throw new InitializationError(e);

Modified: branches/jbosstools-3.3.x/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/SWTJBTExt.java
===================================================================
--- branches/jbosstools-3.3.x/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/SWTJBTExt.java	2012-08-07 13:37:43 UTC (rev 42882)
+++ branches/jbosstools-3.3.x/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/SWTJBTExt.java	2012-08-07 14:01:52 UTC (rev 42883)
@@ -1,5 +1,5 @@
  /*******************************************************************************
-  * Copyright (c) 2007-2009 Red Hat, Inc.
+  * Copyright (c) 2007-2012 Red Hat, Inc.
   * Distributed under license by Red Hat, Inc. All rights reserved.
   * This program is made available under the terms of the
   * Eclipse Public License v1.0 which accompanies this distribution,
@@ -32,8 +32,8 @@
 import org.jboss.tools.ui.bot.ext.gen.ActionItem;
 import org.jboss.tools.ui.bot.ext.helper.ContextMenuHelper;
 import org.jboss.tools.ui.bot.ext.types.IDELabel;
+import org.jboss.tools.ui.bot.ext.types.IDELabel.PreferencesDialog;
 import org.jboss.tools.ui.bot.ext.types.ViewType;
-import org.jboss.tools.ui.bot.ext.types.IDELabel.PreferencesDialog;
 import org.osgi.framework.Version;
 /**
  * Provides JBoss Tools common operations based on SWTBot element operations
@@ -310,8 +310,6 @@
    */
   public static void runProjectOnServer(SWTWorkbenchBot bot, String projectName){
  
-    bot.shells()[0].activate();
-    
     SWTBotTree packageExplorerTree = eclipse.showView(ViewType.PACKAGE_EXPLORER).tree();
 
     packageExplorerTree.setFocus();
@@ -557,6 +555,15 @@
     } catch (WidgetNotFoundException wnfe){
       // do nothing there is no Atlassian Connector installed
     }
+    
+    // Get rid of welcome screen. Simple close did not work when run in maven
+    try {
+    	bot.menu("Window").menu("Close Perspective").click();
+    	SWTBotFactory.getOpen().perspective(ActionItem.Perspective.JAVA.LABEL);
+    } catch (WidgetNotFoundException e){
+    	// ok, Welcome screen not present
+    	log.info("Welcome window not present");
+    }
   }
 	/**
 	 * Closes JBoss Tools / JBoss Developer Studio Report Usage Window

Modified: branches/jbosstools-3.3.x/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/SWTUtilExt.java
===================================================================
--- branches/jbosstools-3.3.x/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/SWTUtilExt.java	2012-08-07 13:37:43 UTC (rev 42882)
+++ branches/jbosstools-3.3.x/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/SWTUtilExt.java	2012-08-07 14:01:52 UTC (rev 42883)
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2007-2009 Red Hat, Inc.
+ * Copyright (c) 2007-2012 Red Hat, Inc.
  * Distributed under license by Red Hat, Inc. All rights reserved.
  * This program is made available under the terms of the
  * Eclipse Public License v1.0 which accompanies this distribution,
@@ -16,10 +16,12 @@
 import static org.junit.Assert.fail;
 
 import java.io.BufferedReader;
+import java.io.ByteArrayOutputStream;
 import java.io.File;
 import java.io.FileReader;
 import java.io.IOException;
 import java.io.InputStream;
+import java.io.PrintStream;
 import java.lang.reflect.InvocationTargetException;
 import java.util.ArrayList;
 import java.util.Iterator;
@@ -43,7 +45,9 @@
 import org.eclipse.swtbot.swt.finder.finders.UIThreadRunnable;
 import org.eclipse.swtbot.swt.finder.results.Result;
 import org.eclipse.swtbot.swt.finder.results.WidgetResult;
+import org.eclipse.swtbot.swt.finder.utils.SWTBotPreferences;
 import org.eclipse.swtbot.swt.finder.utils.SWTUtils;
+import org.eclipse.swtbot.swt.finder.waits.ICondition;
 import org.eclipse.swtbot.swt.finder.widgets.SWTBotMenu;
 import org.eclipse.swtbot.swt.finder.widgets.SWTBotShell;
 import org.eclipse.swtbot.swt.finder.widgets.SWTBotToolbarButton;
@@ -72,7 +76,7 @@
  */
 public class SWTUtilExt extends SWTUtils {
 
-	private Logger log = Logger.getLogger(SWTUtilExt.class);
+	private static Logger log = Logger.getLogger(SWTUtilExt.class);
 	protected SWTWorkbenchBot bot;
 	
 	private static class AlwaysMatchMatcher<T extends Widget> extends BaseMatcher<T> {
@@ -198,32 +202,50 @@
 	
 	/**
 	 * Wait for named running jobs with defined TIMEOUT
+	 * @param jobNames
 	 */
 	public void waitForJobs(String... jobNames) {
-		waitForJobs(TIMEOUT, jobNames);
+		waitForJobs(false,TIMEOUT, jobNames);
 	}
 
+  /**
+   * Wait for named running jobs with defined TIMEOUT
+   * 
+   * @param timeout
+   * @param jobNames
+   */
+  public void waitForJobs(long timeout ,String... jobNames) {
+    waitForJobs(false,timeout, jobNames);
+  }
+
 	/**
 	 * Wait for all running jobs not named in JobList.ignoredJobs
 	 * 
 	 * @param timeOut
 	 */
 	public void waitForNonIgnoredJobs(long timeOut) {
-		waitForAllExcept(timeOut, JobLists.ignoredJobs);
+		waitForAllExcept(false,timeOut, JobLists.ignoredJobs);
 	}
-
+  /**
+   * Wait for all running jobs not named in JobList.ignoredJobs
+   * 
+   * @param timeOut
+   */
+  public void waitForNonIgnoredJobs(boolean includeSleepingJobs,long timeOut) {
+    waitForAllExcept(includeSleepingJobs,timeOut, JobLists.ignoredJobs);
+  }
 	/**
 	 * Wait for all running jobs not named in JobList.ignoredJobs
 	 */
 	public void waitForNonIgnoredJobs() {
-		waitForAllExcept(TIMEOUT, JobLists.ignoredJobs);
+		waitForAllExcept(false, TIMEOUT, JobLists.ignoredJobs);
 	}
 
 	/**
 	 * Wait for all running jobs
 	 */
 	public void waitForAll(long timeOut) {
-		waitForAllExcept(timeOut, new String[0]);
+	  waitForAll(false , timeOut);
 	}
 
 	/**
@@ -232,16 +254,50 @@
 	 * @param timeOut
 	 */
 	public void waitForAll() {
-		waitForAllExcept(TIMEOUT, new String[0]);
+	  waitForAll(false, TIMEOUT);
 	}
-
+	 /**
+   * Wait for all running jobs
+   * 
+   * @param includeSleepingJobs
+   */
+  public void waitForAll(boolean includeSleepingJobs) {
+    waitForAll(includeSleepingJobs,TIMEOUT);
+  }
+  /**
+  * Wait for all running jobs
+  *
+  * @param includeSleepingJobs
+  * @param timeout
+  */
+  public void waitForAll(boolean includeSleepingJobs , long timeout) {
+   waitForAllExcept(includeSleepingJobs,timeout, new String[0]);
+  }
+  /**
+   * Wait for all running jobs except named jobs
+   * 
+   * @param timeOut
+   * @param jobNames
+   */
+  public void waitForAllExcept(long timeOut, String... jobNames) {
+    waitForAllExcept(false, timeOut,jobNames);
+  }
+  /**
+   * Wait for all running jobs except named jobs
+   * 
+   * @param jobNames
+   */
+  public void waitForAllExcept(String... jobNames) {
+    waitForAllExcept(false, TIMEOUT,jobNames);
+  }
 	/**
 	 * Wait for all running jobs except named jobs
 	 * 
+	 * @param includeSleepingJobs
 	 * @param timeOut
 	 * @param jobNames
 	 */
-	public void waitForAllExcept(long timeOut, String... jobNames) {
+	public void waitForAllExcept(boolean includeSleepingJobs , long timeOut, String... jobNames) {
 
 		// Find all jobs
 		Job[] jobs = Job.getJobManager().find(null);
@@ -263,16 +319,17 @@
 			names[i] = listNames.get(i);
 		}
 
-		waitForJobs(timeOut, names);
+		waitForJobs(includeSleepingJobs,timeOut, names);
 	}
 
 	/**
 	 * Waits for selected job
 	 * 
+	 * @param includeSleepingJobs
 	 * @param timeOut
 	 * @param jobNames
 	 */
-	public void waitForJobs(long timeOut, String... jobNames) {
+	public void waitForJobs(boolean includeSleepingJobs,long timeOut, String... jobNames) {
 
 		// DEBUG
 		printRunningJobs();
@@ -294,14 +351,25 @@
 				log.info("Blocking job " + jobName + " found");
 				blockingJobs.add(jobName);
 			}
+			else if (includeSleepingJobs && isJobSleeping(jobName)) {
+			  log.info("Blocking sleeping job " + jobName + " found");
+        blockingJobs.add(jobName);
+			}
 		}
 
 		// Wait until all blocking jobs aren't finished or timeout
 		for (String jobName : blockingJobs) {
 			while (true) {
-				if (!isJobRunning(jobName)) {
-					log.info("Job  " + jobName + " is finished");
-					break;
+				if (!isJobRunning(jobName)){
+				  boolean jobStoped = true;
+				  if (includeSleepingJobs){
+				    jobStoped = !isJobSleeping(jobName);
+				  }
+				  
+				  if (jobStoped){
+	          log.info("Job  " + jobName + " is finished");
+	          break;
+				  }
 				}
 
 				long waitTime = System.currentTimeMillis() - startTime;
@@ -310,7 +378,7 @@
 							+ timeOut + "ms");
 					break;
 				}
-				log.info("Job \"" + jobName + "\" is running for " + waitTime
+				log.info("Waiting for Job \"" + jobName + "\" for " + waitTime
 						/ 1000 + "s");
 				bot.sleep(SLEEPTIME);
 			}
@@ -336,6 +404,24 @@
 		return false;
 	}
 
+	 /**
+   * Search for jobname in JobManager job list
+   * 
+   * @param jobName
+   *            name of the job
+   * @return true if job with corresponding name found, else false
+   */
+  private boolean isJobSleeping(String jobName) {
+    Job[] jobs = Job.getJobManager().find(null);
+    for (Job job : jobs) {
+      if ((jobName.equalsIgnoreCase(job.getName()))
+          && (job.getState() == JobState.SLEEPING)){
+        return true;
+      }  
+    }
+    return false;
+  }
+  
 	public void printRunningJobs() {
 		Job[] jobs = Job.getJobManager().find(null);
 		for (Job job : jobs) {
@@ -663,7 +749,13 @@
   public static void displayAllBotWidgets (SWTBot bot){
     List<?> widgets = bot.widgets(new SWTUtilExt.AlwaysMatchMatcher<Widget>());
     for (Object object : widgets){
-      System.out.println(object + 
+      String objectToString;
+      try{
+        objectToString = object.toString(); 
+      } catch (Throwable t){
+        objectToString = "<null>";
+      }
+      System.out.println(objectToString  +  
         " Text: " + SWTUtilExt.invokeMethod(object, "getText") +
         " Tooltip: " + SWTUtilExt.invokeMethod(object, "getToolTipText"));
     }
@@ -853,4 +945,169 @@
         return new SWTBotMenu(menuItem, matcher);
     }
 
+    /********** CAPTURING OF STANDARD OUTPUT **********/
+
+    /**
+     * Default output stream before redirecting.
+     */
+    private static PrintStream defaultOutputStream = System.out;
+    /**
+     * Redirected output stream for capturing output.
+     */
+    private static ByteArrayOutputStream capturingByteArrayOutputStream = null;
+
+    /**
+     * Starts capturing of standard output.
+     * Redirects standard output into other <code>PrintStream</code>
+     * which is captured.
+     */
+    public static void startCapturingStandardOutput() {
+        capturingByteArrayOutputStream = new ByteArrayOutputStream();
+        System.setOut(new PrintStream(capturingByteArrayOutputStream));
+        log.info("Capturing of standard output was started.");
+    }
+
+    /**
+     * Stops capturing of standard output by setting the default standard output.
+     * 
+     * @return Captured output.
+     */
+    public static String stopCapturingStandardOutput() {
+        System.setOut(defaultOutputStream);
+        final String capturedOutput = new String(capturingByteArrayOutputStream.toByteArray());
+        capturingByteArrayOutputStream = null;
+        log.info("Capturing of standard output was stopped.");
+        return capturedOutput;
+    }
+
+    /********** END OF CAPTURING OF STANDARD OUTPUT **********/
+    
+    /**
+     * Waits until toolbarButton with timeout SWTBotPreferences.TIMEOUT  
+     * @param toolbarButton
+     */
+    public void waitForToolbarButtonEnabled (SWTBotToolbarButton toolbarButton) {
+      waitForToolbarButtonEnabled(toolbarButton, SWTBotPreferences.TIMEOUT);
+    }
+    /**
+     * Waits until toolbarButton is enabled with timeout  
+     * @param toolbarButton
+     */
+    public void waitForToolbarButtonEnabled (final SWTBotToolbarButton toolbarButton, final long timeout) {
+      bot.waitUntil(new ICondition() {
+        
+        @Override
+        public boolean test() throws Exception {
+          return toolbarButton.isEnabled();
+        }
+        
+        @Override
+        public void init(SWTBot bot) {
+        }
+        
+        @Override
+        public String getFailureMessage() {
+          return "Tooolbar button with tooltip " + toolbarButton.getToolTipText() +
+              " was not enabled within " + timeout + " miliseconds";
+        }
+      },
+      timeout);
+    }
+    /**
+     * Waits while toolbarButton is disabled with timeout SWTBotPreferences.TIMEOUT  
+     * @param toolbarButton
+     */
+    public void waitWhileToolbarButtonisDisabled (SWTBotToolbarButton toolbarButton) {
+      waitWhileToolbarButtonisDisabled(toolbarButton, SWTBotPreferences.TIMEOUT);
+    }
+    /**
+     * Waits while toolbarButton is disabled with timeout  
+     * @param toolbarButton
+     */
+    public void waitWhileToolbarButtonisDisabled (final SWTBotToolbarButton toolbarButton, final long timeout) {
+      bot.waitWhile(new ICondition() {
+        
+        @Override
+        public boolean test() throws Exception {
+          return toolbarButton.isEnabled();
+        }
+        
+        @Override
+        public void init(SWTBot bot) {
+        }
+        
+        @Override
+        public String getFailureMessage() {
+          return "Tooolbar button with tooltip " + toolbarButton.getToolTipText() +
+              " was not enabled within " + timeout + " miliseconds";
+        }
+      },
+      timeout);
+    }
+    /**
+     * Waits until toolbarButton is with tooltip is found with timeout  
+     * @param tooltip
+     * @param timeout
+     */
+    public void waitForToolbarButtonWithTooltipIsFound (final String tooltip, final long timeout) {
+      bot.waitUntil(new ICondition() {
+        
+        @Override
+        public boolean test() throws Exception {
+          boolean toolbarButtonIsFound = false;
+          try {
+            bot.toolbarButtonWithTooltip(tooltip);
+            toolbarButtonIsFound = true;
+          }
+          catch (WidgetNotFoundException wnfe){
+            toolbarButtonIsFound = false;
+          }
+          return toolbarButtonIsFound;
+        }
+        
+        @Override
+        public void init(SWTBot bot) {
+        }
+        
+        @Override
+        public String getFailureMessage() {
+          return "Tooolbar button with tooltip " + tooltip +
+              " was not available " + timeout + " miliseconds";
+        }
+      },
+      timeout);
+    }
+    /**
+     * Waits until toolbarButton with mnemonicText is found with timeout  
+     * @param text
+     * @param timeout
+     */
+    public void waitForButtonIsFound (final String text, final long timeout) {
+      bot.waitUntil(new ICondition() {
+        
+        @Override
+        public boolean test() throws Exception {
+          boolean buttonIsFound = false;
+          try {
+            bot.button(text);
+            buttonIsFound = true;
+          }
+          catch (WidgetNotFoundException wnfe){
+            buttonIsFound = false;
+          }
+          return buttonIsFound;
+        }
+        
+        @Override
+        public void init(SWTBot bot) {
+        }
+        
+        @Override
+        public String getFailureMessage() {
+          return "Button with text " + text +
+              " was not available " + timeout + " miliseconds";
+        }
+      },
+      timeout);
+    }
 }
\ No newline at end of file

Copied: branches/jbosstools-3.3.x/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/condition/ViewIsActive.java (from rev 42878, trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/condition/ViewIsActive.java)
===================================================================
--- branches/jbosstools-3.3.x/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/condition/ViewIsActive.java	                        (rev 0)
+++ branches/jbosstools-3.3.x/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/condition/ViewIsActive.java	2012-08-07 14:01:52 UTC (rev 42883)
@@ -0,0 +1,42 @@
+package org.jboss.tools.ui.bot.ext.condition;
+
+import org.eclipse.swtbot.eclipse.finder.widgets.SWTBotView;
+import org.eclipse.swtbot.swt.finder.SWTBot;
+import org.eclipse.swtbot.swt.finder.exceptions.WidgetNotFoundException;
+import org.eclipse.swtbot.swt.finder.utils.StringUtils;
+import org.eclipse.swtbot.swt.finder.utils.internal.Assert;
+import org.eclipse.swtbot.swt.finder.waits.ICondition;
+import org.jboss.tools.ui.bot.ext.SWTBotFactory;
+
+/**
+ * SWTBot Condition checking if a view is active
+ * @author jjankovi
+ *
+ */
+public class ViewIsActive implements ICondition{
+	
+	private String viewTitle;	
+
+	public ViewIsActive(String viewTitle) {
+		Assert.isNotNull(viewTitle, "View title text was null");
+		Assert.isLegal(!StringUtils.isEmpty(viewTitle), "View title text was empty");
+		this.viewTitle = viewTitle;
+	}
+
+	public String getFailureMessage() {
+		return "View '" + viewTitle + "' is not active";
+	}
+
+	public boolean test() throws Exception {
+		try {
+			SWTBotView view = SWTBotFactory.getBot().viewByTitle(viewTitle);			
+			return view.isActive();
+		} catch (WidgetNotFoundException e) {
+		}
+		return false;
+	}
+
+	@Override
+	public void init(SWTBot bot) {	
+	}
+}

Modified: branches/jbosstools-3.3.x/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/requirement/AddServer.java
===================================================================
--- branches/jbosstools-3.3.x/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/requirement/AddServer.java	2012-08-07 13:37:43 UTC (rev 42882)
+++ branches/jbosstools-3.3.x/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/requirement/AddServer.java	2012-08-07 14:01:52 UTC (rev 42883)
@@ -2,9 +2,9 @@
 
 import static org.junit.Assert.fail;
 
-import org.eclipse.swtbot.swt.finder.SWTBot;
 import org.jboss.tools.ui.bot.ext.SWTTestExt;
 import org.jboss.tools.ui.bot.ext.config.TestConfigurator;
+import org.jboss.tools.ui.bot.ext.gen.ActionItem.Server.JBossCommunityJBossAS32;
 import org.jboss.tools.ui.bot.ext.gen.ActionItem.Server.JBossCommunityJBossAS42;
 import org.jboss.tools.ui.bot.ext.gen.ActionItem.Server.JBossCommunityJBossAS50;
 import org.jboss.tools.ui.bot.ext.gen.ActionItem.Server.JBossCommunityJBossAS51;
@@ -14,6 +14,7 @@
 import org.jboss.tools.ui.bot.ext.gen.ActionItem.Server.JBossEnterpriseMiddlewareJBossEnterpriseApplicationPlatform43;
 import org.jboss.tools.ui.bot.ext.gen.ActionItem.Server.JBossEnterpriseMiddlewareJBossEnterpriseApplicationPlatform5x;
 import org.jboss.tools.ui.bot.ext.gen.ActionItem.Server.JBossEnterpriseMiddlewareJBossEnterpriseApplicationPlatform6x;
+import org.jboss.tools.ui.bot.ext.gen.ActionItem.ServerRuntime.JBossCommunityJBoss32Runtime;
 import org.jboss.tools.ui.bot.ext.gen.ActionItem.ServerRuntime.JBossCommunityJBoss42Runtime;
 import org.jboss.tools.ui.bot.ext.gen.ActionItem.ServerRuntime.JBossCommunityJBoss50Runtime;
 import org.jboss.tools.ui.bot.ext.gen.ActionItem.ServerRuntime.JBossCommunityJBoss51Runtime;
@@ -150,6 +151,9 @@
 			}			
 		}
 		else if (TestConfigurator.Values.SERVER_TYPE_AS.equals(serverType)) {
+			if ("3.2".equals(version)) {
+				return new ServerInfo(JBossCommunityJBoss32Runtime.LABEL,JBossCommunityJBossAS32.LABEL);				
+			}
 			if ("4.2".equals(version)) {
 				return new ServerInfo(JBossCommunityJBoss42Runtime.LABEL,JBossCommunityJBossAS42.LABEL);				
 			}

Copied: branches/jbosstools-3.3.x/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/entity/XMLConfiguration.java (from rev 42878, trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/entity/XMLConfiguration.java)
===================================================================
--- branches/jbosstools-3.3.x/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/entity/XMLConfiguration.java	                        (rev 0)
+++ branches/jbosstools-3.3.x/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/entity/XMLConfiguration.java	2012-08-07 14:01:52 UTC (rev 42883)
@@ -0,0 +1,70 @@
+package org.jboss.tools.ui.bot.ext.entity;
+
+public class XMLConfiguration {
+
+	private String key;
+	
+	private String value;
+
+	public XMLConfiguration() {
+		// default
+	}
+	
+	public XMLConfiguration(String key, String value) {
+		super();
+		this.key = key;
+		this.value = value;
+	}
+
+	public String getKey() {
+		return key;
+	}
+
+	public void setKey(String key) {
+		this.key = key;
+	}
+
+	public String getValue() {
+		return value;
+	}
+
+	public void setValue(String value) {
+		this.value = value;
+	}
+	
+	@Override
+	public String toString() {
+		return getKey() + "=" + getValue();
+	}
+
+	@Override
+	public int hashCode() {
+		final int prime = 31;
+		int result = 1;
+		result = prime * result + ((key == null) ? 0 : key.hashCode());
+		result = prime * result + ((value == null) ? 0 : value.hashCode());
+		return result;
+	}
+
+	@Override
+	public boolean equals(Object obj) {
+		if (this == obj)
+			return true;
+		if (obj == null)
+			return false;
+		if (getClass() != obj.getClass())
+			return false;
+		XMLConfiguration other = (XMLConfiguration) obj;
+		if (key == null) {
+			if (other.key != null)
+				return false;
+		} else if (!key.equals(other.key))
+			return false;
+		if (value == null) {
+			if (other.value != null)
+				return false;
+		} else if (!value.equals(other.value))
+			return false;
+		return true;
+	}
+}

Modified: branches/jbosstools-3.3.x/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/helper/ContentAssistHelper.java
===================================================================
--- branches/jbosstools-3.3.x/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/helper/ContentAssistHelper.java	2012-08-07 13:37:43 UTC (rev 42882)
+++ branches/jbosstools-3.3.x/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/helper/ContentAssistHelper.java	2012-08-07 14:01:52 UTC (rev 42883)
@@ -130,4 +130,41 @@
 
   }
   
+  /**
+   * Checks Content Assist auto proposal. It's case when there is only one
+   * content assist item and that item is automatically inserted into editor
+   * and checks if expectedProposalList is equal to current Proposal List 
+   * @param editorTitle
+   * @param textToSelect
+   * @param selectionOffset
+   * @param selectionLength
+   * @param textToSelectIndex
+   * @param expectedInsertedText
+   */
+  public static SWTBotEditor checkContentAssistAutoProposal(SWTBotExt bot,
+      String editorTitle, String textToSelect, int selectionOffset,
+      int selectionLength, int textToSelectIndex, String expectedInsertedText) {
+
+    SWTJBTExt.selectTextInSourcePane(bot,
+        editorTitle, textToSelect, selectionOffset, selectionLength,
+        textToSelectIndex);
+
+    bot.sleep(Timing.time1S());
+
+    SWTBotEditorExt editor = SWTTestExt.bot.swtBotEditorExtByTitle(editorTitle);
+    String editorLineBeforeInsert = editor.getTextOnCurrentLine();
+    int xPos = editor.cursorPosition().column;
+    String expectedEditorLineAfterInsert = editorLineBeforeInsert.substring(0,xPos) +
+        expectedInsertedText +
+        editorLineBeforeInsert.substring(xPos);
+    ContentAssistBot contentAssist = editor.contentAssist();
+    contentAssist.invokeContentAssist();
+    String editorLineAfterInsert = editor.getTextOnCurrentLine();
+    assertTrue("Text on current line should be:\n" +
+        "but is :\n" + editorLineAfterInsert
+        , editorLineAfterInsert.equals(expectedEditorLineAfterInsert));
+
+    return editor;
+
+  }
 } 

Modified: branches/jbosstools-3.3.x/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/helper/KeyboardHelper.java
===================================================================
--- branches/jbosstools-3.3.x/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/helper/KeyboardHelper.java	2012-08-07 13:37:43 UTC (rev 42882)
+++ branches/jbosstools-3.3.x/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/helper/KeyboardHelper.java	2012-08-07 14:01:52 UTC (rev 42883)
@@ -1,3 +1,13 @@
+/*******************************************************************************
+ * Copyright (c) 2012 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
 package org.jboss.tools.ui.bot.ext.helper;
 
 import java.awt.AWTException;
@@ -13,34 +23,64 @@
 
 public class KeyboardHelper {
   private static Robot robot = null;
+
+  public static void keyPressedEvent (Display display, int keyCode) {
+	  Event keyPressed = new Event();
+	  keyPressed.keyCode = keyCode;   
+	  keyPressed.type = SWT.KeyDown;
+	  display.post(keyPressed);
+  }
+
+  public static void keyReleasedEvent (Display display, int keyCode) {
+	  Event keyReleased = new Event();
+	  keyReleased.keyCode = keyCode;   
+	  keyReleased.type = SWT.KeyUp;
+	  display.post(keyReleased);
+  }
+
   /**
    * Simulate pressing of key with keyCode via SWT
    * @param display
    * @param keyCode
    */
-  public static void pressKeyCode (Display display , int keyCode){
-    
-    Event keyPressed = new Event();
-    keyPressed.keyCode = keyCode;   
-    keyPressed.type = SWT.KeyDown;
-    display.post(keyPressed);
-    Event keyReleased = new Event();
-      keyReleased.keyCode = keyCode;   
-      keyReleased.type = SWT.KeyUp;
-    display.post(keyReleased);
-    
+  public static void pressKeyCode (Display display, int keyCode) {
+	  keyPressedEvent(display, keyCode);
+	  keyReleasedEvent(display, keyCode);
   }
+
   /**
    * Simulate pressing of keys with keyCodes via SWT
    * @param display
    * @param keyCodes
    */
-  public static void pressKeyCodes (Display display , byte[] keyCodes){
-    for (byte keyCode : keyCodes){
-      KeyboardHelper.pressKeyCode(display,keyCode);
-      SWTUtils.sleep(Timing.time1S());
-    }
+  public static void pressKeyCodes (Display display, byte[] keyCodes){
+	  for (byte keyCode : keyCodes){
+		  KeyboardHelper.pressKeyCode(display,keyCode);
+		  SWTUtils.sleep(Timing.time1S());
+	  }
   }
+
+  public static void typeKeyCodeUsingSWT (Display display, int swtKeyCode , int... modifiers){
+	  if (modifiers != null){
+		  for (int modifierCode : modifiers){
+			  KeyboardHelper.keyPressedEvent(display, modifierCode);
+		  }
+	  }
+	  KeyboardHelper.pressKeyCode(display, swtKeyCode);
+	  if (modifiers != null){
+		  for (int modifierCode : modifiers){
+			  KeyboardHelper.keyReleasedEvent(display, modifierCode);
+		  }
+	  }
+  }
+
+  public static void selectTextUsingSWTEvents (Display display, boolean forward, int selectionLength) {
+	  int arrowCode = forward ? SWT.ARROW_RIGHT : SWT.ARROW_LEFT;
+	  for (int index = 0 ; index < selectionLength; index ++){
+		  typeKeyCodeUsingSWT(display, arrowCode, SWT.SHIFT);
+	  }
+  }
+  
   /**
    * Simulate pressing of key with keyCode via AWT
    * @param awtKeyCode

Copied: branches/jbosstools-3.3.x/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/helper/SubversiveHelper.java (from rev 42878, trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/helper/SubversiveHelper.java)
===================================================================
--- branches/jbosstools-3.3.x/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/helper/SubversiveHelper.java	                        (rev 0)
+++ branches/jbosstools-3.3.x/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/helper/SubversiveHelper.java	2012-08-07 14:01:52 UTC (rev 42883)
@@ -0,0 +1,59 @@
+package org.jboss.tools.ui.bot.ext.helper;
+
+import org.apache.log4j.Logger;
+import org.eclipse.core.runtime.Platform;
+import org.jboss.tools.ui.bot.ext.SWTBotExt;
+import org.osgi.framework.Bundle;
+
+public class SubversiveHelper {
+	
+	static Logger log = Logger.getLogger(SubversiveHelper.class);
+
+	/**
+	 * Check if Subversive is installed or not
+	 */
+	public static boolean isSubversiveInstalled() {
+		String[] names = { "org.eclipse.team.svn","org.eclipse.team.svn.core","org.eclipse.team.svn.ui"};
+	
+		boolean result = true;
+		for (String name : names ) {
+			Bundle bundle = Platform.getBundle(name);
+			if (bundle == null) {
+				result = false;
+				break;
+			}			
+		}
+		return result;			
+	}
+	
+	/**
+	 * Disables Subversive Decorations (for projects, etc.)
+	 */
+	public static void disableSVNDecoration() {
+
+		if (!isSubversiveInstalled()) {
+			log.info("Subversive is not installed, skiping SVN Decoration disabling");
+			return;
+		}
+		
+		// commented, this is relevant only when SVN is installed as all
+
+		SWTBotExt botExt = new SWTBotExt();
+		botExt.menu("Window").menu("Preferences").click();
+		botExt.tree().expandNode("Team", "SVN", "Label Decorations").select();
+
+		botExt.tabItem("Text Decorations").activate();
+		botExt.textWithLabel("File:").setText("");
+		botExt.textWithLabel("Folder:").setText("");
+		botExt.textWithLabel("Project:").setText("");
+		botExt.button("OK").click();
+
+		/*
+		 * Obsolete text botExt.tabItem("Text").activate();
+		 * botExt.textWithLabel("File Format:").setText("");
+		 * botExt.textWithLabel("Folder Format:").setText("");
+		 * botExt.textWithLabel("Project Format:").setText("");
+		 * botExt.button("OK").click();
+		 */
+	}
+}

Modified: branches/jbosstools-3.3.x/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/logging/LogWidgetsVisitor.java
===================================================================
--- branches/jbosstools-3.3.x/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/logging/LogWidgetsVisitor.java	2012-08-07 13:37:43 UTC (rev 42882)
+++ branches/jbosstools-3.3.x/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/logging/LogWidgetsVisitor.java	2012-08-07 14:01:52 UTC (rev 42883)
@@ -57,7 +57,11 @@
 
 	@Override
 	protected void visitCLabel(CLabel widget) {
-		log.info(widget);
+		StringBuilder text = new StringBuilder();
+		text.append("CLabel {");
+		text.append(widget.getText());
+		text.append("}");
+		log.info(text.toString());
 	}
 
 	@Override

Modified: branches/jbosstools-3.3.x/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/matcher/console/ConsoleOutputMatcher.java
===================================================================
--- branches/jbosstools-3.3.x/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/matcher/console/ConsoleOutputMatcher.java	2012-08-07 13:37:43 UTC (rev 42882)
+++ branches/jbosstools-3.3.x/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/matcher/console/ConsoleOutputMatcher.java	2012-08-07 14:01:52 UTC (rev 42883)
@@ -1,11 +1,15 @@
 package org.jboss.tools.ui.bot.ext.matcher.console;
 
+import org.eclipse.swtbot.swt.finder.SWTBot;
+import org.eclipse.swtbot.swt.finder.waits.ICondition;
+import org.eclipse.swtbot.swt.finder.widgets.TimeoutException;
 import org.hamcrest.Description;
 import org.hamcrest.TypeSafeMatcher;
 import org.jboss.tools.ui.bot.ext.SWTBotFactory;
+import org.jboss.tools.ui.bot.ext.condition.TaskDuration;
 
 /**
- * Checks if the console contains specified text. 
+ * Checks if the console contains specified text (and waits for it to appear if necessary). 
  * 
  * @author Lucia Jelinkova
  *
@@ -13,18 +17,63 @@
 public class ConsoleOutputMatcher extends TypeSafeMatcher<String> {
 
 	private String consoleText;
+
+	private long timeout;
+
+	public ConsoleOutputMatcher() {
+		timeout = 0;
+	}
 	
+	public ConsoleOutputMatcher(long timeout) {
+		this.timeout = timeout;
+	}
+	
+	public ConsoleOutputMatcher(TaskDuration taskDuration) {
+		this.timeout = taskDuration.getTimeout();
+	}
+	
 	@Override
 	public boolean matchesSafely(String item) {
-		consoleText = SWTBotFactory.getConsole().getConsoleText();
-		if (consoleText == null){
-			throw new IllegalStateException("No console output present");
+		try {
+			SWTBotFactory.getBot().waitUntil(new ConsoleContainsTextCondition(item), timeout);
+			if (consoleText == null){
+				throw new IllegalStateException("No console output present");
+			}
+			return true;
+		} catch (TimeoutException e){
+			return false;
 		}
-		return consoleText.contains(item);
 	}
 
 	@Override
 	public void describeTo(Description description) {
 		description.appendText("is in console output, but instead: \n" + consoleText);
 	}
+
+	private class ConsoleContainsTextCondition implements ICondition {
+
+		private String expectedText;
+
+		public ConsoleContainsTextCondition(String item) {
+			this.expectedText = item;
+		}
+
+		@Override
+		public boolean test() throws Exception {
+			consoleText = SWTBotFactory.getConsole().getConsoleText();
+			if (consoleText == null){
+				return false;
+			}
+			return consoleText.contains(expectedText);
+		}
+
+		@Override
+		public void init(SWTBot bot) {
+		}
+
+		@Override
+		public String getFailureMessage() {
+			return null;
+		}
+	}
 }

Modified: branches/jbosstools-3.3.x/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/parts/ContentAssistBot.java
===================================================================
--- branches/jbosstools-3.3.x/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/parts/ContentAssistBot.java	2012-08-07 13:37:43 UTC (rev 42882)
+++ branches/jbosstools-3.3.x/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/parts/ContentAssistBot.java	2012-08-07 14:01:52 UTC (rev 42883)
@@ -132,7 +132,7 @@
 	/*
 	 * Invokes ContentAssistProposal shell action
 	 */
-	private void invokeContentAssist() {
+	public void invokeContentAssist() {
 		String actionId = "ContentAssistProposal";
 		//final IAction action = ((ITextEditor) partReference.getEditor(false)).getAction(actionId);
 		Object oEditor = editor.getReference().getEditor(false);
@@ -282,7 +282,7 @@
 	 * @param s2
 	 * @return
 	 */
-	private SWTBotShell getContentAssistShell(SWTBotShell[] s1, SWTBotShell[] s2) {
+	public SWTBotShell getContentAssistShell(SWTBotShell[] s1, SWTBotShell[] s2) {
 		SWTBotShell ccShell = null;
 		for (SWTBotShell bs2 : s2) {
 			boolean found = false;

Modified: branches/jbosstools-3.3.x/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/parts/SWTBotBrowserExt.java
===================================================================
--- branches/jbosstools-3.3.x/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/parts/SWTBotBrowserExt.java	2012-08-07 13:37:43 UTC (rev 42882)
+++ branches/jbosstools-3.3.x/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/parts/SWTBotBrowserExt.java	2012-08-07 14:01:52 UTC (rev 42883)
@@ -65,6 +65,7 @@
 	public SWTBotBrowserExt(Browser w) {
 		super(w);
 		pl = new PListener(this);
+		pl.setDone(false);
 	}
 	/**
 	 * gets 'href' attribute of link from currently loaded 
@@ -257,7 +258,7 @@
 		
 		@Override
 		public void run() {
-			pl.setDone(false);
+			//pl.setDone(false);
 			widget.addProgressListener(pl);
 		}
 	});

Modified: branches/jbosstools-3.3.x/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/parts/SWTBotFormTextExt.java
===================================================================
--- branches/jbosstools-3.3.x/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/parts/SWTBotFormTextExt.java	2012-08-07 13:37:43 UTC (rev 42882)
+++ branches/jbosstools-3.3.x/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/parts/SWTBotFormTextExt.java	2012-08-07 14:01:52 UTC (rev 42883)
@@ -2,12 +2,12 @@
 
 import java.lang.reflect.Field;
 
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.widgets.Event;
 import org.eclipse.swtbot.swt.finder.ReferenceBy;
 import org.eclipse.swtbot.swt.finder.SWTBotWidget;
 import org.eclipse.swtbot.swt.finder.exceptions.WidgetNotFoundException;
+import org.eclipse.swtbot.swt.finder.results.BoolResult;
 import org.eclipse.swtbot.swt.finder.results.StringResult;
+import org.eclipse.swtbot.swt.finder.results.VoidResult;
 import org.eclipse.swtbot.swt.finder.widgets.AbstractSWTBotControl;
 import org.eclipse.ui.forms.widgets.FormText;
 import org.eclipse.ui.internal.forms.widgets.FormTextModel;
@@ -36,11 +36,44 @@
 	}
 	
 	public AbstractSWTBotControl<FormText> click()  {
-		setFocus();
+		/*syncExec(new VoidResult() {
+			
+			@Override
+			public void run() {
+				click(widget.toDisplay(25,5).x, widget.toDisplay(25,5).y, true); //+20 is there because of icon
+			}
+		});*/
+		int timeout = 0;
+		while (!hasFocus() && timeout!=5){
+			//try to set focus
+			setFocus();
+			log.info("Trying to set focus");
+			sleep(1000);
+			timeout++;
+		}
+		if (!hasFocus()){
+			throw new IllegalStateException("Unable to focus widget of type Hyperlink");
+		}
 		keyboard().typeCharacter('\r');
 		return this;
 	}
 	
+	/**
+	 * Tests whether widget has focus or not. Needed for workaround of issue, where method setFocus() isn't working properly when ececuting test via maven.
+	 * @return true if widget has focus. False otherwise.
+	 */
+	
+	public boolean hasFocus(){
+		return syncExec(new BoolResult() {
+			
+			@Override
+			public Boolean run() {
+				return widget.isFocusControl();
+			}
+		});
+	}
+
+	
 	public String selectedLinkText() {
 		return syncExec(new StringResult() {
 			

Modified: branches/jbosstools-3.3.x/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/parts/SWTBotHyperlinkExt.java
===================================================================
--- branches/jbosstools-3.3.x/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/parts/SWTBotHyperlinkExt.java	2012-08-07 13:37:43 UTC (rev 42882)
+++ branches/jbosstools-3.3.x/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/parts/SWTBotHyperlinkExt.java	2012-08-07 14:01:52 UTC (rev 42883)
@@ -1,6 +1,7 @@
 package org.jboss.tools.ui.bot.ext.parts;
 
 import org.eclipse.swtbot.swt.finder.exceptions.WidgetNotFoundException;
+import org.eclipse.swtbot.swt.finder.results.BoolResult;
 import org.eclipse.swtbot.swt.finder.widgets.AbstractSWTBot;
 import org.eclipse.swtbot.swt.finder.widgets.AbstractSWTBotControl;
 import org.eclipse.ui.forms.widgets.Hyperlink;
@@ -21,11 +22,38 @@
 	 * @return
 	 */
 	public AbstractSWTBot<Hyperlink> activate() {
-		setFocus();
+		int timeout = 0;
+		while (!hasFocus() && timeout!=5){
+			//try to set focus
+			setFocus();
+			log.info("Trying to set focus");
+			sleep(1000);
+			timeout++;
+		}
+		if (!hasFocus()){
+			throw new IllegalStateException("Unable to focus widget of type Hyperlink");
+		}
 		keyboard().typeCharacter('\r');
 		return this;
 	}
+	
+	
 	/**
+	 * Tests whether widget has focus or not. Needed for workaround of issue, where method setFocus() isn't working properly when ececuting test via maven.
+	 * @return true if widget has focus. False otherwise.
+	 */
+	
+	public boolean hasFocus(){
+		return syncExec(new BoolResult() {
+			
+			@Override
+			public Boolean run() {
+				return widget.isFocusControl();
+			}
+		});
+	}
+
+	/**
 	 * clicks on hyper-link (not real click, but {@link SWTBotHyperlinkExt#activate()}
 	 */
 	public AbstractSWTBot<Hyperlink> click() {

Modified: branches/jbosstools-3.3.x/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/parts/SWTBotTwistie.java
===================================================================
--- branches/jbosstools-3.3.x/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/parts/SWTBotTwistie.java	2012-08-07 13:37:43 UTC (rev 42882)
+++ branches/jbosstools-3.3.x/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/parts/SWTBotTwistie.java	2012-08-07 14:01:52 UTC (rev 42883)
@@ -51,15 +51,8 @@
 	 * Toggles twistie (expands its section)
 	 */
 	public AbstractSWTBotControl<Twistie> toggle() {
-		syncExec(new VoidResult() {
-			
-			@Override
-			public void run() {
-				clickXY(widget.getBounds().x+3, widget.getBounds().y+3);
-			}
-		});
-		/*setFocus();
-		keyboard().typeCharacter('\r');*/
+		setFocus();
+		keyboard().typeCharacter('\r');
 		return this;
 	}
 	

Modified: branches/jbosstools-3.3.x/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/types/IDELabel.java
===================================================================
--- branches/jbosstools-3.3.x/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/types/IDELabel.java	2012-08-07 13:37:43 UTC (rev 42882)
+++ branches/jbosstools-3.3.x/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/types/IDELabel.java	2012-08-07 14:01:52 UTC (rev 42883)
@@ -282,6 +282,7 @@
 		public static final String DATA_SOURCE_EXPLORER = "Data Source Explorer";
 		public static final String SERVERS = "Servers";
 		public static final String WEB_PROJECTS = "Web Projects";
+		public static final String WEB_SERVICE_TESTER = "Web Service Tester";
 		public static final String CONSOLE = "Console";
 		public static final String PROBLEMS = "Problems";
 		public static final String DEBUG = "Debug";

Modified: branches/jbosstools-3.3.x/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/view/ErrorLogView.java
===================================================================
--- branches/jbosstools-3.3.x/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/view/ErrorLogView.java	2012-08-07 13:37:43 UTC (rev 42882)
+++ branches/jbosstools-3.3.x/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/view/ErrorLogView.java	2012-08-07 14:01:52 UTC (rev 42883)
@@ -6,6 +6,7 @@
 import org.eclipse.swtbot.swt.finder.widgets.SWTBotShell;
 import org.eclipse.swtbot.swt.finder.widgets.SWTBotTreeItem;
 import org.jboss.tools.ui.bot.ext.gen.ActionItem;
+import org.jboss.tools.ui.bot.ext.gen.ActionItem.View.GeneralErrorLog;
 import org.jboss.tools.ui.bot.ext.helper.ContextMenuHelper;
 
 /**
@@ -16,6 +17,10 @@
  */
 public class ErrorLogView extends ViewBase {
 
+	public ErrorLogView() {
+		viewObject = GeneralErrorLog.LABEL;
+	}
+	
 	/**
 	 * logs all error log messages into a logger
 	 */

Modified: branches/jbosstools-3.3.x/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/view/ExplorerBase.java
===================================================================
--- branches/jbosstools-3.3.x/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/view/ExplorerBase.java	2012-08-07 13:37:43 UTC (rev 42882)
+++ branches/jbosstools-3.3.x/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/view/ExplorerBase.java	2012-08-07 14:01:52 UTC (rev 42883)
@@ -122,7 +122,14 @@
 		}
 		item.select().doubleClick();
 		log.info("File Opened:" + builder.toString());
-		SWTBotEditor editor = bot.activeEditor();
+    SWTBotEditor editor = null;
+    // Try to find editor containing opened file
+    try{
+      editor = bot.editorByTitle(path[path.length - 1]);  
+    } catch (WidgetNotFoundException wnfe){
+      // in case name of opened file is different then editor title of editor containing opened file
+      editor = bot.activeEditor();
+    }
 		return editor;
 	}
 	/**

Copied: branches/jbosstools-3.3.x/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/view/PaletteView.java (from rev 42878, trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/view/PaletteView.java)
===================================================================
--- branches/jbosstools-3.3.x/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/view/PaletteView.java	                        (rev 0)
+++ branches/jbosstools-3.3.x/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/view/PaletteView.java	2012-08-07 14:01:52 UTC (rev 42883)
@@ -0,0 +1,26 @@
+/******************************************************************************* 
+ * Copyright (c) 2012 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.ui.bot.ext.view;
+
+import org.apache.log4j.Logger;
+import org.jboss.tools.ui.bot.ext.gen.ActionItem;
+/**
+ * Represents JBoss Tools Palette View
+ * @author vpakan at redhat.com
+ *
+ */
+public class PaletteView extends ViewBase {
+	Logger log = Logger.getLogger(PaletteView.class);
+	public PaletteView() {
+		viewObject = ActionItem.View.JBossToolsWebJBossToolsPalette.LABEL;		
+	}
+
+}

Modified: branches/jbosstools-3.3.x/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/view/ServersView.java
===================================================================
--- branches/jbosstools-3.3.x/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/view/ServersView.java	2012-08-07 13:37:43 UTC (rev 42882)
+++ branches/jbosstools-3.3.x/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/view/ServersView.java	2012-08-07 14:01:52 UTC (rev 42883)
@@ -1,5 +1,8 @@
 package org.jboss.tools.ui.bot.ext.view;
 
+import java.util.ArrayList;
+import java.util.List;
+
 import org.eclipse.swtbot.swt.finder.SWTBot;
 import org.eclipse.swtbot.swt.finder.exceptions.WidgetNotFoundException;
 import org.eclipse.swtbot.swt.finder.waits.ICondition;
@@ -8,10 +11,12 @@
 import org.eclipse.swtbot.swt.finder.widgets.SWTBotShell;
 import org.eclipse.swtbot.swt.finder.widgets.SWTBotTree;
 import org.eclipse.swtbot.swt.finder.widgets.SWTBotTreeItem;
+import org.jboss.tools.ui.bot.ext.SWTBotFactory;
 import org.jboss.tools.ui.bot.ext.SWTTestExt;
 import org.jboss.tools.ui.bot.ext.Timing;
 import org.jboss.tools.ui.bot.ext.condition.NonSystemJobRunsCondition;
 import org.jboss.tools.ui.bot.ext.condition.TaskDuration;
+import org.jboss.tools.ui.bot.ext.entity.XMLConfiguration;
 import org.jboss.tools.ui.bot.ext.gen.ActionItem.View.ServerServers;
 import org.jboss.tools.ui.bot.ext.helper.ContextMenuHelper;
 import org.jboss.tools.ui.bot.ext.types.IDELabel;
@@ -100,19 +105,19 @@
 		ContextMenuHelper.prepareTreeItemForContextMenu(tree, server);
 		new SWTBotMenu(ContextMenuHelper.getContextMenu(tree, "Restart", false)).click();
 		handleServerAlreadyRunning(bot);
-		
+
 		bot.waitWhile(new NonSystemJobRunsCondition(), TaskDuration.VERY_LONG.getTimeout());
 		bot.waitUntil(new ICondition() {
-			
+
 			@Override
 			public boolean test() throws Exception {
 				return "Started".equals(getServerStatus(serverName));
 			}
-			
+
 			@Override
 			public void init(SWTBot bot) {
 			}
-			
+
 			@Override
 			public String getFailureMessage() {
 				return "The server does not have status 'Started'";
@@ -179,10 +184,16 @@
 		}
 		return null;
 	}
-	
+
+	public SWTBotTreeItem findServerByName(String name) {
+
+		SWTBot bot = show().bot();
+		return findServerByName(bot.tree(), name);
+	}
+
 	public boolean serverExists(String serverName){
 		SWTBot bot = show().bot();
-		
+
 		try {
 			// if there are no servers the following text appears
 			bot.link("No servers available. Define a new server from the <a>new server wizard</a>...");
@@ -190,21 +201,57 @@
 		} catch (WidgetNotFoundException e){
 			// ok, there are some servers, let's check the name
 		}
-		
+
 		SWTBotTreeItem server = findServerByName(bot.tree(), serverName);
 		return server != null;
 	}
-	
+
 	public String getServerStatus(String serverName){
 		SWTBot bot = show().bot();
 		SWTBotTreeItem server = findServerByName(bot.tree(), serverName);
-		
+
 		String label = server.getText();
 		int startIndex = label.indexOf('[') + 1;
 		int endIndex = label.indexOf(',');
 		return label.substring(startIndex, endIndex);
 	}
 	
+	public String getServerPublishStatus(String serverName){
+		SWTBot bot = show().bot();
+		SWTBotTreeItem server = findServerByName(bot.tree(), serverName);
+
+		String label = server.getText();
+		int startIndex = label.indexOf(',') + 2;
+		int endIndex = label.indexOf(']');
+		return label.substring(startIndex, endIndex);
+	}
+
+	public boolean containsProject(String serverName, String project){
+		SWTBot bot = show().bot();
+		SWTBotTreeItem server = findServerByName(bot.tree(), serverName);
+		server.expand();
+		
+		try {
+			getProjectNode(server, project);
+			return true;
+		} catch (WidgetNotFoundException e){
+			return false;
+		}
+	}
+	
+	private SWTBotTreeItem getProjectNode(SWTBotTreeItem server, String projectName){
+		for (SWTBotTreeItem child : server.getItems()){
+			String name = child.getText();
+			if (name.contains("[")){
+				name = name.substring(0, name.indexOf("["));
+			}
+			if (name.trim().equals(projectName)){
+				return child;
+			}
+		}
+		throw new WidgetNotFoundException("Project " + projectName + " was not found within server");
+	}
+
 	/**
 	 * removes project with given name from all servers
 	 * @param projectName
@@ -249,4 +296,105 @@
 
 	}
 
+	public void addProjectToServer(String projectName, String serverName){
+		SWTBot bot = show().bot();
+		SWTBotTree serversTree = bot.tree();
+		SWTBotTreeItem server = findServerByName(serversTree, serverName); 
+
+		ContextMenuHelper.prepareTreeItemForContextMenu(serversTree,server);
+		new SWTBotMenu(ContextMenuHelper.getContextMenu(serversTree, IDELabel.Menu.ADD_AND_REMOVE, false)).click();
+
+		SWTBot shellBot = bot.shell("Add and Remove...").bot();
+
+		shellBot.tree(0).getTreeItem(projectName).select();
+		shellBot.button("Add >").click();
+		shellBot.button("Finish").click();
+		shellBot.waitWhile(new NonSystemJobRunsCondition(), TaskDuration.VERY_LONG.getTimeout());
+	}
+	
+	public void removeProjectFromServer(String projectName, String serverName){
+		SWTBot bot = show().bot();
+		SWTBotTree serversTree = bot.tree();
+		SWTBotTreeItem server = findServerByName(serversTree, serverName); 
+
+		ContextMenuHelper.prepareTreeItemForContextMenu(serversTree,server);
+		new SWTBotMenu(ContextMenuHelper.getContextMenu(serversTree, IDELabel.Menu.ADD_AND_REMOVE, false)).click();
+
+		SWTBot shellBot = bot.shell("Add and Remove...").bot();
+
+		shellBot.tree(1).getTreeItem(projectName).select();
+		shellBot.button("< Remove").click();
+		shellBot.button("Finish").click();
+		shellBot.waitWhile(new NonSystemJobRunsCondition(), TaskDuration.VERY_LONG.getTimeout());
+	}
+
+	public void openServerEditor(String serverName){
+		SWTBot bot = show().bot();
+		SWTBotTreeItem server = findServerByName(bot.tree(), serverName);
+		server.doubleClick();
+	}
+	
+	public void openWebPage(String serverName){
+		SWTBot bot = show().bot();
+		SWTBotTree serversTree = bot.tree();
+		SWTBotTreeItem server = findServerByName(serversTree, serverName);
+		
+		server.contextMenu("Web Browser").click();
+	}
+	
+	public void openWebPage(String serverName, String projectName){
+		SWTBot bot = show().bot();
+		SWTBotTree serversTree = bot.tree();
+		SWTBotTreeItem server = findServerByName(serversTree, serverName);
+		SWTBotTreeItem project = getProjectNode(server, projectName);
+		project.contextMenu("Web Browser").click();
+	}
+	
+	public List<XMLConfiguration> getXMLConfiguration(String serverName, String categoryName){
+		SWTBotTreeItem server = findServerByName(serverName);
+		server.expand();
+		final SWTBotTreeItem category = server.expandNode("XML Configuration", categoryName);
+
+		String separator = "   ";
+		SWTBotFactory.getBot().waitUntil(new TreeItemLabelDecorated(category.getNode(0), separator));
+
+		List<XMLConfiguration> configurations = new ArrayList<XMLConfiguration>();
+		for (final SWTBotTreeItem item : category.getItems()){
+			String[] columns = item.getText().split(separator);
+			if (columns.length < 2){
+				// it is nested node, we should process it recursively in the future
+				// but for now not crucial, let's skip it
+				continue;
+			}
+			configurations.add(new XMLConfiguration(columns[0].trim(), columns[1].trim()));
+		}
+		return configurations;
+	}
+
+	private static class TreeItemLabelDecorated implements ICondition {
+
+		private String separator;
+
+		private SWTBotTreeItem item;
+		
+		public TreeItemLabelDecorated(SWTBotTreeItem item, String separator) {
+			super();
+			this.item = item;
+			this.separator = separator;
+		}
+
+		@Override
+		public void init(SWTBot bot) {
+		}
+
+		@Override
+		public boolean test() throws Exception {
+			return item.getText().contains(separator);
+		}
+
+		@Override
+		public String getFailureMessage() {
+			return "Expected the tree item to be decorated with separator '" + separator + "'";
+		}
+	}
 }

Modified: branches/jbosstools-3.3.x/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/view/ViewBase.java
===================================================================
--- branches/jbosstools-3.3.x/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/view/ViewBase.java	2012-08-07 13:37:43 UTC (rev 42882)
+++ branches/jbosstools-3.3.x/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/view/ViewBase.java	2012-08-07 14:01:52 UTC (rev 42883)
@@ -1,8 +1,30 @@
 package org.jboss.tools.ui.bot.ext.view;
 
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
 import org.apache.log4j.Logger;
+import org.eclipse.jface.action.IToolBarManager;
+import org.eclipse.jface.action.ToolBarManager;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.widgets.ToolBar;
+import org.eclipse.swt.widgets.ToolItem;
 import org.eclipse.swtbot.eclipse.finder.widgets.SWTBotView;
 import org.eclipse.swtbot.swt.finder.SWTBot;
+import org.eclipse.swtbot.swt.finder.exceptions.WidgetNotFoundException;
+import org.eclipse.swtbot.swt.finder.finders.UIThreadRunnable;
+import org.eclipse.swtbot.swt.finder.results.ListResult;
+import org.eclipse.swtbot.swt.finder.utils.SWTUtils;
+import org.eclipse.swtbot.swt.finder.widgets.SWTBotToolbarButton;
+import org.eclipse.swtbot.swt.finder.widgets.SWTBotToolbarDropDownButton;
+import org.eclipse.swtbot.swt.finder.widgets.SWTBotToolbarPushButton;
+import org.eclipse.swtbot.swt.finder.widgets.SWTBotToolbarRadioButton;
+import org.eclipse.swtbot.swt.finder.widgets.SWTBotToolbarSeparatorButton;
+import org.eclipse.swtbot.swt.finder.widgets.SWTBotToolbarToggleButton;
+import org.eclipse.ui.IViewSite;
+import org.eclipse.ui.IWorkbenchPart;
+import org.eclipse.ui.internal.WorkbenchPartReference;
 import org.jboss.tools.ui.bot.ext.SWTBotExt;
 import org.jboss.tools.ui.bot.ext.SWTOpenExt;
 import org.jboss.tools.ui.bot.ext.SWTTestExt;
@@ -44,5 +66,91 @@
 	public SWTBotView show() {
 		return open.viewOpen(viewObject);
 	}
+  /**
+   * Get toolbar buttons contained within view
+   * It's workaround for Eclipse Juno where SWTBot is not able to find toolbar buttons of view
+   * @return
+   */
+	public List<SWTBotToolbarButton> getToolbarButtons() {
+		return UIThreadRunnable.syncExec(new ListResult<SWTBotToolbarButton>() {
 
+			public List<SWTBotToolbarButton> run() {
+				SWTBotView view = show();
+				IWorkbenchPart obj = ((WorkbenchPartReference) view.getReference()).getPart(false);
+				ToolBar toolbar = null;
+				IToolBarManager t = ((IViewSite)obj.getSite()).getActionBars().getToolBarManager();
+				if (t instanceof ToolBarManager) {
+				    toolbar = ((ToolBarManager)t).getControl();
+				}
+
+				final List<SWTBotToolbarButton> l = new ArrayList<SWTBotToolbarButton>();
+
+				if (toolbar == null)
+					return l;
+
+				ToolItem[] items = toolbar.getItems();
+				for (int i = 0; i < items.length; i++) {
+					try {
+						if (SWTUtils.hasStyle(items[i], SWT.PUSH))
+							l.add(new SWTBotToolbarPushButton(items[i]));
+						else if(SWTUtils.hasStyle(items[i], SWT.CHECK))
+							l.add(new SWTBotToolbarToggleButton(items[i]));
+						else if(SWTUtils.hasStyle(items[i], SWT.RADIO))
+							l.add(new SWTBotToolbarRadioButton(items[i]));
+						else if(SWTUtils.hasStyle(items[i], SWT.DROP_DOWN))
+							l.add(new SWTBotToolbarDropDownButton(items[i]));
+						else if(SWTUtils.hasStyle(items[i], SWT.SEPARATOR))
+							l.add(new SWTBotToolbarSeparatorButton(items[i]));
+					} catch (WidgetNotFoundException e) {
+						e.printStackTrace();
+					}
+				}
+
+				return l;
+
+			}
+		});
+	}
+  /**
+   * Get first toolbar button contained within view with toolTip
+   * It's workaround for Eclipse Juno where SWTBot is not able to find toolbar buttons of view
+   * @param toolTip
+   * @param index
+   * @return
+   */
+  public SWTBotToolbarButton getToolbarButtonWitTooltip (String toolTip){
+    return getToolbarButtonWitTooltip(toolTip,0); 
+  }
+  /**
+   * Get toolbar button contained within view with toolTip and order specified by index
+   * It's workaround for Eclipse Juno where SWTBot is not able to find toolbar buttons of view
+   * @param toolTip
+   * @param index
+   * @return
+   */
+	public SWTBotToolbarButton getToolbarButtonWitTooltip (String toolTip, int index){
+	  SWTBotToolbarButton result = null;
+	  List<SWTBotToolbarButton> tbList = getToolbarButtons();
+	  if (tbList != null && tbList.size() > 0){
+	    int indexFound = -1;
+	    Iterator<SWTBotToolbarButton> itToolbarButtons = tbList.iterator();
+	    while (result == null && itToolbarButtons.hasNext()){
+	      SWTBotToolbarButton tbItem = itToolbarButtons.next();
+	      if (toolTip.equals(tbItem.getToolTipText())){
+	        indexFound++;
+	        if(indexFound >= index){
+	          result = tbItem;
+	        }
+	      }
+	    }
+	  }
+	  if (result != null){
+	    return result;
+	  }
+	  else{
+	    throw new WidgetNotFoundException("Unable to find toolbar button with tooltip " +
+	      toolTip + " within view " + viewObject.getName());
+	  }  
+	  
+	}
 }

Modified: branches/jbosstools-3.3.x/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/wizards/SWTBotWizard.java
===================================================================
--- branches/jbosstools-3.3.x/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/wizards/SWTBotWizard.java	2012-08-07 13:37:43 UTC (rev 42882)
+++ branches/jbosstools-3.3.x/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/wizards/SWTBotWizard.java	2012-08-07 14:01:52 UTC (rev 42883)
@@ -65,7 +65,7 @@
 		SWTBotShell activeShell = getActiveShell();
 		finish();
 		log.info("Waiting until active shell is active");
-		bot().waitWhile(new ShellIsActiveCondition(activeShell), TaskDuration.VERY_LONG.getTimeout());
+		bot().waitWhile(new ShellIsActiveCondition(activeShell), TaskDuration.VERY_LONG.getTimeout()+TaskDuration.VERY_LONG.getTimeout()); //DO NOT COMMIT THIS!
 		log.info("Waiting until Progress Information Shell is active");
 		bot().waitWhile(new ProgressInformationShellIsActiveCondition(), TaskDuration.LONG.getTimeout());
 		log.info("Waiting until Non System Jobs run started");



More information about the jbosstools-commits mailing list