Java Tab (Record and Run Settings Dialog Box)

This tab enables you to instruct UFT to open your Java applet or application each time you begin a recording session, or to instruct UFT to record on any open Java application.

To access

Record > Record and Run Settings and select the Java tab.

Important information

  • Testing Java applets in a Web browser. You must load both the Web Add-in and the Java Add-in. In this case, you use the Web tab of the Record and Run Settings dialog box to specify your record and run preferences.

  • Testing business components. Components do not require specific record and run settings to work with Java applets and applications. To record a business component, you need to first open the Java applet or application manually. Alternatively, you can include steps in your business component that connect to the Java applet or application, for example, you can include a step that contains the OpenApp operation.

    When you begin recording a new business component, the Applications dialog box opens (unless you previously specified a Windows environment in the Business Component Settings dialog box or the application area's Additional Settings pane). Click OK in the dialog box without making modifications to begin recording. For details on the Applications pane and Applications dialog box, see Record and run test on any open Windows-based application.

See also

Recording steps on Java objects

User interface elements are described below:

UI Element Description
Record and run test on any open Java application

Instructs UFT to record and run the test on any open Java application or applet.

Open the following application when a record or run session begins

Instructs UFT to open a new Java application or applet using the specified application details.

  • This setting controls only which Java application, if any, is opened at the beginning of a record or run session. It does not affect the applications that UFT recognizes. Even if this radio button is selected and no application is specified, UFT can still record, recognize, and run on any open Java application.

  • When working with a Java applet inside a browser, use the Web Tab (Record and Run Settings Dialog Box) to open the URL containing the applet.

Application details

The details of the Java application on which to run the test:

  • Executable file. Instructs UFT to open the specified executable or batch file.

  • Command line. Instructs UFT to open the application from the specified command line.

  • Working directory. Instructs UFT to run the specified executable file or command line from the specified directory. Make sure you specify the full directory path, for example, %ProgramFiles%\Java\jre1.6.0\bin.

    Always enter a value in the Working directory field, otherwise UFT cannot open your Java application.

If you define values for the EXEPATH_ENV, CMDLINE_ENV, and/or WORKDIR_ENV test environment variables, these values override the values in the Executable file, Command line, and Working Directory boxes of the Java tab during a run session.