< prev index next >

application/uitests/org.openjdk.jmc.test.jemmy/src/test/java/org/openjdk/jmc/test/jemmy/misc/base/wrappers/MCJemmyBase.java

Print this page

        

@@ -212,10 +212,21 @@
         protected static Wrap<? extends Shell> getShell() {
                 return Shells.SHELLS.lookup(Shell.class, new ByTextShell<>("JDK Mission Control")).wrap();
         }
 
         /**
+         * Gets a shell by text
+         *
+         * @param text
+         *            the text string to lookup the shell with
+         * @return the associated shell
+         */
+        protected static Wrap<? extends Shell> getShellByText(String text) {
+                return Shells.SHELLS.lookup(Shell.class, new ByTextShell<>(text)).wrap();
+        }
+
+        /**
          * Tries to set focus on Mission Control
          */
         public static void focusMc() {
                 getShell().as(Focusable.class).focuser().focus();
         }
< prev index next >