Insert a Java code snippet

You can insert a Java code snippet to perform additional operations that are not supported by the simplified scripts. The Java code snippet runs during script playback.


Before you begin

Prerequisite: Knowledge of Java programming

To insert a Java code snippet:


Procedure

  1. Select the test line in the simplified script editor. Right-click and select Insert Java Code Snippet (). This line is inserted after the selected test line: Click here to tag the Java snippet

  2. To easily identify the Java code in the Java editor, select the inserted test line and replace the test line text by typing a tag for the Java code.

  3. Click File > Save to save the simplified script.

  4. Click Java editor that is displayed next to the Script editor. The inserted Java tag is displayed as a comment with the start and the end point for inserting the Java code in the Java editor.

  5. Type the Java code within the start and the end comment section.

  6. Click File > Save to save the Java script. During the script playback, the inserted Java code also runs.

    Do not edit the Java code outside the start and the end points that are inserted when you use the Insert the Java code snippet feature in the simplified script editor. All the changes to the Java script are lost if you later edit the simplified script.

+

Search Tips   |   Advanced Search