[jbosstools-commits] JBoss Tools SVN: r43861 - trunk/as/tests/org.jboss.ide.eclipse.as.ui.bot.test/src/org/jboss/ide/eclipse/as/ui/bot/test/wizard.

jbosstools-commits at lists.jboss.org jbosstools-commits at lists.jboss.org
Thu Sep 20 08:46:19 EDT 2012


Author: ljelinko
Date: 2012-09-20 08:46:19 -0400 (Thu, 20 Sep 2012)
New Revision: 43861

Modified:
   trunk/as/tests/org.jboss.ide.eclipse.as.ui.bot.test/src/org/jboss/ide/eclipse/as/ui/bot/test/wizard/ImportProjectWizard.java
Log:
Trying to load projects for import by focusing the table istead of pressing tab. 

Modified: trunk/as/tests/org.jboss.ide.eclipse.as.ui.bot.test/src/org/jboss/ide/eclipse/as/ui/bot/test/wizard/ImportProjectWizard.java
===================================================================
--- trunk/as/tests/org.jboss.ide.eclipse.as.ui.bot.test/src/org/jboss/ide/eclipse/as/ui/bot/test/wizard/ImportProjectWizard.java	2012-09-20 11:30:04 UTC (rev 43860)
+++ trunk/as/tests/org.jboss.ide.eclipse.as.ui.bot.test/src/org/jboss/ide/eclipse/as/ui/bot/test/wizard/ImportProjectWizard.java	2012-09-20 12:46:19 UTC (rev 43861)
@@ -1,8 +1,6 @@
 package org.jboss.ide.eclipse.as.ui.bot.test.wizard;
 
 import org.eclipse.swtbot.swt.finder.SWTBot;
-import org.eclipse.swtbot.swt.finder.keyboard.KeyboardFactory;
-import org.eclipse.swtbot.swt.finder.keyboard.Keystrokes;
 import org.eclipse.swtbot.swt.finder.waits.ICondition;
 import org.eclipse.swtbot.swt.finder.widgets.SWTBotTree;
 import org.eclipse.swtbot.swt.finder.widgets.SWTBotTreeItem;
@@ -50,7 +48,7 @@
 	private void loadProjectsFromFolder() {
 		getBot().text(0).setText(projectPath);
 		getBot().text(0).setFocus();
-		KeyboardFactory.getAWTKeyboard().pressShortcut(Keystrokes.TAB);
+		getProjectsTree().setFocus();
 		getBot().waitUntil(new ProjectIsLoaded());
 	}
 
@@ -58,14 +56,14 @@
 		getBot().radio("Select archive file:").click();
 		getBot().text(1).setText(zipFilePath);
 		getBot().text(1).setFocus();
-		KeyboardFactory.getAWTKeyboard().pressShortcut(Keystrokes.TAB);
+		getProjectsTree().setFocus();
 		getBot().waitUntil(new ProjectIsLoaded());
 	}
 
 	private void selectProjects() {
 		selectCopyProjectsIntoWorkspace();
 		getBot().button("Deselect All").click();
-		SWTBotTree projectsTree = getBot().treeWithLabel("Projects:");
+		SWTBotTree projectsTree = getProjectsTree();
 		
 		for (String projectName : projectNames){
 			SWTBotTreeItem  projectItem = getProjectTreeItem(projectsTree, projectName);
@@ -73,6 +71,10 @@
 		}
 	}
 
+	private SWTBotTree getProjectsTree() {
+		return getBot().treeWithLabel("Projects:");
+	}
+
 	private SWTBotTreeItem getProjectTreeItem(SWTBotTree projectsTree, String projectName) {
 		for (SWTBotTreeItem item : projectsTree.getAllItems()){
 			if (projectName.equals(getProjectLabel(item.getText()))){



More information about the jbosstools-commits mailing list