Author: jpeterka
Date: 2010-11-05 03:09:35 -0400 (Fri, 05 Nov 2010)
New Revision: 26273
Modified:
trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/SWTEclipseExt.java
Log:
#isViewOpened method added
Modified:
trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/SWTEclipseExt.java
===================================================================
---
trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/SWTEclipseExt.java 2010-11-05
02:15:12 UTC (rev 26272)
+++
trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/SWTEclipseExt.java 2010-11-05
07:09:35 UTC (rev 26273)
@@ -90,7 +90,26 @@
this.open = new SWTOpenExt(bot);
}
+
// ------------------------------------------------------------
+ // Check methods
+ // ------------------------------------------------------------
+ /**
+ * Check if view is opened
+ */
+ public boolean isViewOpened(String view) {
+ try {
+ bot.viewByTitle(view);
+ log.info("View \"" + view + "\" is opened");
+ return true;
+ }
+ catch (WidgetNotFoundException ex) {
+ log.info("View \"" + view + "\" is NOT opened");
+ return false;
+ }
+ }
+
+ // ------------------------------------------------------------
// View related methods
// ------------------------------------------------------------
/**
@@ -308,7 +327,7 @@
log.info(nodeName);
}
return item.select();
- }
+ }
// ------------------------------------------------------------
// Subroutines
Show replies by date