[jbosstools-commits] JBoss Tools SVN: r43597 - trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/helper.
jbosstools-commits at lists.jboss.org
jbosstools-commits at lists.jboss.org
Tue Sep 11 10:34:15 EDT 2012
Author: jjankovi
Date: 2012-09-11 10:34:15 -0400 (Tue, 11 Sep 2012)
New Revision: 43597
Modified:
trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/helper/TreeHelper.java
Log:
TreeHelper now throws WidgetNotFoundException as before
Modified: trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/helper/TreeHelper.java
===================================================================
--- trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/helper/TreeHelper.java 2012-09-11 13:35:23 UTC (rev 43596)
+++ trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/helper/TreeHelper.java 2012-09-11 14:34:15 UTC (rev 43597)
@@ -7,6 +7,7 @@
import org.eclipse.swtbot.swt.finder.SWTBot;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotTree;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotTreeItem;
+import org.eclipse.swtbot.swt.finder.widgets.TimeoutException;
import org.jboss.tools.ui.bot.ext.Timing;
import org.jboss.tools.ui.bot.ext.condition.TreeContainsNode;
import org.jboss.tools.ui.bot.ext.condition.TreeItemContainsNode;
@@ -23,7 +24,11 @@
List<String> asList = new ArrayList<String>(Arrays.asList(nodes));
SWTBotTree tree = bot.tree(0);
- bot.waitUntil(new TreeContainsNode(tree,asList.get(0)), Timing.time5S());
+ try {
+ bot.waitUntil(new TreeContainsNode(tree,asList.get(0)), Timing.time5S());
+ } catch (TimeoutException exc) {
+ // do nothing, WidgetNotFoundException will be thrown just after this
+ }
SWTBotTreeItem item = tree.getTreeItem(asList.get(0));
asList.remove(0);
@@ -33,7 +38,11 @@
item.getNode(0).getText().equals("Loading...")) {
bot.sleep(Timing.time1S());
}
- bot.waitUntil(new TreeItemContainsNode(item, node), Timing.time5S());
+ try {
+ bot.waitUntil(new TreeItemContainsNode(item, node), Timing.time5S());
+ } catch (TimeoutException exc) {
+ // do nothing, WidgetNotFoundException will be thrown just after this
+ }
item = item.getNode(node);
}
return item;
More information about the jbosstools-commits
mailing list