home *** CD-ROM | disk | FTP | other *** search
/ io Programmo 25 / IOPROG_25.ISO / SOFT / JavaS / javastar-eval.exe / data1.cab / Help_Files / tutorial / declarations / GetSearchResults.java < prev    next >
Encoding:
Java Source  |  1999-02-11  |  1.5 KB  |  60 lines

  1. /** Generated by JavaStar Java GUI Testing Tool
  2.  * Do not modify anything before the setup() method
  3.  */
  4.  
  5. import suntest.javastar.lib.*;
  6. import java.awt.*;
  7. import NameData.*;
  8.  
  9. public class GetSearchResults extends Script {
  10.  
  11.   static int Do_Not_Remove_This_JavaStar_Identifier;
  12.   private static String Name = "GetSearchResults";
  13.   private static GetSearchResults X = new GetSearchResults();
  14.  
  15.   private static String[] Args = {};
  16.   public String[] getAppArgs(){ return Args; }
  17.  
  18.   public String getAppClass(){ return "namedb"; }
  19.  
  20.   public void run() throws Throwable {
  21.     namedb.main(Args);
  22.   }
  23.  
  24.   public static void main(String[] args) throws Throwable {
  25.     setup();
  26.     try{
  27.       args = JS.processPlayerArgs(args);
  28.       X.setGold(JS.goldenDirectory(Name,null));
  29.       JS.playbackInit(Name);
  30.       JS.startApplication(X);
  31.       X.play(args);
  32.       cleanup();
  33.       JS.playbackEnd(Name,true);
  34.     } catch(Throwable t){
  35.       cleanup();
  36.       JS.playbackEnd(Name,t);
  37.     }
  38.   }
  39.  
  40.   public static void setup() throws Throwable {
  41.   }
  42.  
  43.   public static void cleanup() throws Throwable {
  44.   }
  45.  
  46.   public void play(String[] args) throws Throwable {
  47.     JS.frame("Search").button("Search").buttonPress();
  48.  
  49. JS.frame("Search").member("java.awt.List").verifyAnyMethod(this,false,true,"getItemCount",new Integer(1), "Verify expected number of matches returned");
  50.  
  51.  
  52.     JS.frame("Search").member("java.awt.List").multiClick(22,6,16,1);
  53.  
  54.     JS.frame("Search").member("java.awt.List").select(args[0]);      
  55.  
  56.     JS.frame("Search").button("View Result").buttonPress();
  57.  
  58.   }
  59. }
  60.