Index: gs3-extensions/testing/trunk/src/src/gstests/tutorials/RunGLITest.java
===================================================================
--- gs3-extensions/testing/trunk/src/src/gstests/tutorials/RunGLITest.java	(revision 32683)
+++ gs3-extensions/testing/trunk/src/src/gstests/tutorials/RunGLITest.java	(revision 32684)
@@ -19,47 +19,103 @@
 import org.junit.Before;
 import org.junit.Test;
-
+import org.assertj.swing.data.Index;
+     
+import org.greenstone.gatherer.Gatherer;
 import org.greenstone.gatherer.GathererProg; // main GLI class we'll be testing
+import org.greenstone.gatherer.Dictionary; // access to display strings
 
 import org.assertj.swing.junit.testcase.AssertJSwingJUnitTestCase;
-import org.assertj.swing.fixture.FrameFixture;
+import org.assertj.swing.fixture.*;
 import org.assertj.swing.edt.GuiActionRunner;
-
+import org.assertj.swing.core.*;
+import javax.swing.*;
+     
 // static imports
 import static org.assertj.swing.launcher.ApplicationLauncher.*;
-
+import static org.assertj.swing.finder.WindowFinder.findFrame;
 
 public class RunGLITest extends AssertJSwingJUnitTestCase {
-  private FrameFixture window;
-
-  @Override
-  protected void onSetUp() {
-    GathererProg frame = GuiActionRunner.execute(() -> new GathererProg());
-    // IMPORTANT: note the call to 'robot()'
-    // we must use the Robot from AssertJSwingJUnitTestCase
+    private FrameFixture window;
     
-    //window = new FrameFixture(robot(), frame);
-    //window.show(); // shows the frame to test
-
-    // Launch GathererProg.java's main() method
-    // See https://joel-costigliola.github.io/assertj/assertj-swing-launch.html
-
-    String GSDLOS = System.getenv("GSDLOS");
-    String GSDLHOME = System.getenv("GSDLHOME");
-    String GSDL3HOME = System.getenv("GSDL3HOME");
-    String GSDL3SRCHOME = System.getenv("GSDL3SRCHOME");
-    application("org.greenstone.gatherer.GathererProg").withArgs(
+    @Override
+    protected void onSetUp() {
+	GathererProg frame = GuiActionRunner.execute(() -> new GathererProg());           
+	// IMPORTANT: note the call to 'robot()'
+	// we must use the Robot from AssertJSwingJUnitTestCase
+	
+	//window = new FrameFixture(robot(), frame);
+	//window.show(); // shows the frame to test
+	
+	// Launch GathererProg.java's main() method
+	// See https://joel-costigliola.github.io/assertj/assertj-swing-launch.html
+	
+	String GSDLOS = System.getenv("GSDLOS");
+	String GSDLHOME = System.getenv("GSDLHOME");
+	String GSDL3HOME = System.getenv("GSDL3HOME");
+	String GSDL3SRCHOME = System.getenv("GSDL3SRCHOME");
+	application("org.greenstone.gatherer.GathererProg").withArgs(
 								 "-gsdl", GSDLHOME,
 								 "-gsdlos", GSDLOS,
 								 "-gsdl3", GSDL3HOME,
 								 "-gsdl3src", GSDL3SRCHOME).start();
+    }
+    
+    
+  @Test
+  public void testGLIRunning() {
+
+      
+      // waiting 2 seconds for window, so we can see it
+      try{
+	Thread.sleep(5000);
+      } catch(Exception e) {
+	  e.printStackTrace();
+      }
+      
+    
+      System.err.println("@@@ First test: GLI Running");
+      
+      
+      String expectedWindowTitle = Gatherer.PROGRAM_NAME;
+
+   
+      // https://joel-costigliola.github.io/assertj/assertj-swing-launch.html
+      window = findFrame(new GenericTypeMatcher<JFrame>(JFrame.class) {
+	      protected boolean isMatching(JFrame window) {
+		  return window.getTitle().trim().startsWith(expectedWindowTitle)
+		  && window.isShowing();
+	      }
+	  }).using(robot());
+
+      	
+	String gatherPaneLabel = Dictionary.get("GUI.Gather");
+	System.err.println("@@@ Expecting label: " + gatherPaneLabel);
+
+	System.err.println("@@@ Second test: that Gather panel is selected and has right title");
+	
+	/*GenericTypeMatcher<JTabbedPane> textMatcher = new GenericTypeMatcher<JTabbedPane>(JTabbedPane.class) {
+		@Override protected boolean isMatching(JTabbedPane tabPane) {
+		    int index = GuiActionRunner.execute(() -> tabPane.getSelectedIndex());
+		    //int index = tabPane.getSelectedIndex();
+		    String selectedTabTitle = GuiActionRunner.execute(() -> tabPane.getTitleAt(index));
+		    System.err.println("### GOT TITLE: " + selectedTabTitle);
+		    return gatherPaneLabel.equals(selectedTabTitle);
+		}
+	    };
+	*/
+	JTabbedPaneFixture tab = window.tabbedPane(new GenericTypeMatcher<JTabbedPane>(JTabbedPane.class) {
+		@Override protected boolean isMatching(JTabbedPane tabPane) {
+		    System.err.println("### trying for match");
+		    //int index = GuiActionRunner.execute(() -> tabPane.getSelectedIndex());
+		    int index = tabPane.getSelectedIndex();
+		    String selectedTabTitle = tabPane.getTitleAt(index); //GuiActionRunner.execute(() -> tabPane.getTitleAt(index));
+		    System.err.println("### GOT TITLE: " + selectedTabTitle);
+		    return gatherPaneLabel.equals(selectedTabTitle);
+		}
+	    });
+	tab.requireSelectedTab(Index.atIndex(1));
+	tab.requireTitle(gatherPaneLabel, Index.atIndex(1));
   }
-
-  @Test
-  public void shouldCopyTextInLabelWhenClickingButton() {
-      System.err.println("@@@ First test");
-      //window.textBox("textToCopy").enterText("Some random text");
-      //window.button("copyButton").click();
-      //window.label("copiedText").requireText("Some random text");
-  }
+ 
+    
 }
