Switching to Java scripting

You can switch to Java scripting to insert Java code to perform additional operations such as extending an API or functions that cannot be performed directly in the simplified script editor. To use both the simplified script and Java scripting, use the Insert Java Code Snippet or Insert Java Method feature that is available in the simplified script editor and switch to Java scripting. If you modify the Java script directly without using these features, the Java script changes are lost and the simplified script runs during playback.

Use the Insert Java Method feature to insert a method to logically group the lines of code. You can call the Java method from different locations in the script using the Java Code Snippet feature.

Use the Insert Java Code Snippet feature to insert a few lines of code.

When you insert Java custom code, a test line in the simplified script editor indicates that Java code or a Java module is inserted in the Java script editor. The Java code snippets are added between the test lines as indicated in the simplified script editor. A block of comments is added in the Java script editor, indicating the start and the end points for adding the Java code. The Java method is added at the end of the Java script. During playback, the Java code snippets and the Java method are run.

If you have generated simplified scripts and switch to Java scripting mode permanently, you can edit the Java code outside the start and the end points and continue working with Java scripting. Ensure that you do not edit the simplified scripts. All the changes in the Java code are lost and the updated simplified script is run during playback.


Search Tips   |   Advanced Search