How to Write the Invoke Method

This functionality is supported only if you are using the Classic Agent.

Add an invoke method inside the JavaMainWin definition. This method should interact with the appropriate controls on the HTML page to launch the Java application from the browser. You can code this method by hand or click Record > Method to use the dialog box.

Example

An HTML page uses a pushbutton inside an applet to launch a standalone Java application from the browser.

The declaration for the wMainWindow looks like the following:
window BrowserChild JavaAWTTestApplet
The declaration for the pushbutton inside the applet looks like the following:
JavaApplet StartTheTestApplicationIn2
  tag "Start the Test Application in a"
JavaAwtPushButton StartTestApplication
tag
"Start Test Application"
The following is a sample Invoke method highlighted in blue and declared inside the declaration for the main window of the Java application.
Note: The method clicks on the pushbutton that launches the Java application.
window JavaMainWin TestApp
  tag "Test Application"
    Menu File
    Menu Control
    Menu Menu
    Menu DisabledMenu

    void OpenWindows (STRING sMenuItem)
    void Invoke()
      JavaAWTTestApplet.StartTheTestApplicationIn2.StartTestApplication.Click()