Recording a Java Swing Applet

The Internet Explorer wizard (IE wizard) can record and test Java™ Swing Applets. In order to successfully record Java Swing Applets, make sure the following conditions are true:

  • Reveille is properly installed.
  • Sun Java runtime is properly installed.
  • Microsoft® Internet Explorer® is the default system browser.
  • JOSIT files are located in the correct Java runtime installation directory.

Note:  Anytime a newer version of the Java Runtime Environment (JRE) is installed, the JOSIT files (josit.jar, jaccess.jar, and accessibility.properties) located in \<Reveille Installation Path>\Reveille\Support\java, must be manually copied to the corresponding directories of the new JRE installation. The files need to be copied to [JRE]\lib\accessibility.properties, [JRE]\lib\ext\josit.jar, and [JRE]\lib\ext\jaccess.jar where [JRE] represents the directory where the Sun Microsystems Java Runtime Environment (JRE) is installed.

  • No instances of Internet Explorer are running. If any instance of Internet Explorer is running, then the Java Observation Simulation Inspection Toolkit (JOSIT) incorrectly records activity from the running instance of Internet Explorer, rather than recording the activity of the IE wizard's embedded browser control.
  • The Web page being recording contains a Java Swing Applet. Applets using non-Swing widgets are not supported.
  • Java Console is disabled.  If the Java Console is enabled, JOSIT incorrectly records activity from the Java Console, rather than recording the activity of the IE wizard's embedded browser control.

Note:  The default Java installation sets the Java Console to Hide console.

To record a Java Swing Applet using the IE wizard, follow these steps:

  1. From the Add Monitor Tests Using Wizard dialog, select Internet Explorer Wizard, and click OK.  The Internet Explorer Wizard window appears.
  2. Click Next.  The next wizard page appears, which enables you to specify the options for the IE wizard.
  3. Select Record Java Applets to create Tests based on the state of Java Applets displayed on a Web page. An informational message reminds you of the conditions necessary to properly record Java Applets.
  4. Click OK.  Click Next. The Record Java Applet Test wizard page appears.
  5. Click Record to start recording. The button text changes to Stop.
  6. Next to URL, enter the Web page URL containing a Java Swing Applet.
  7. Click Go.  Wait for the Web page to load. After the page completes loading, a beep will sound, and the Add Java Applet Test dialog appears.
  8. Click Add Test to add the Test to the Monitor.  The Internet Explorer Wizard dialog appears.
  9. Click OK.
  10. Click in the applet to give it focus, then click in the Integer 1 text box and enter the value 123.
  11. Click in the Integer 2 text box, and enter the value 456.
  12. Click Click Here To Compute. The applet displays 333.
  13. Click Save Java Applet Test on the IE wizard. The Add Java Applet Test dialog appears.
  14. Click Add Test to add the Test to the Monitor. The Internet Explorer Wizard dialog appears.
  15. Click OK.  Click Stop to stop recording.
  16. Click Next.  The final page appears. Click Finish.

The Left Navigational Pane shows the new Resource and Test.

The IE wizard uses the JOSIT component to store the recorded Java applet state on disk, in order to play back the recorded session when the Test is executed later.

To examine the JOSIT-generated files, go to [WWWDir]\ReveilleTests\Java\<Monitor>, where <Monitor> is the name of the Monitor.