Generating and Using Declarations: Modifying Existing Scripts to Use Abstracted Names


You are not restricted to incorporating declaration files by recording new scripts; you can also edit existing files to reference the declarations. Most often this is not the fastest way to make the change, but in the case of tests that include significant amounts of custom code, you might want to make the changes manually.

When you edit a script to use declarations, you need to:

  1. Open the .java file for your script in the Script Editor.

  2. Add a line of code to import the declarations.
    Put this toward the top of the script, with other import statements.
    import NameData.*;

  3. If you're using abstracted names, modify the component names within the script to use the new, assigned names.

  4. Click Save & Compile.



Send feedback to JavaStar-feedback@suntest.com
Copyright © 1998 Sun Microsystems, Inc. 901 San Antonio Road, Palo Alto, CA 94303. All rights reserved.