See the Help topic.. You can use below concept for your script. -----------------------------------
Add an invoke method inside the JavaMainWin or any mainwindow 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 use Record/Method as described in the User's Guide.
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 this:
[+] window BrowserChild Java11AWTTestApplet
The declaration for the pushbutton inside the applet looks like this:
[-] JavaApplet StartTheTestApplicationIn2
tag "Start the Test Application in a"
[-] JavaAwtPushButton StartTestApplication
tag "Start Test Application"
Here is a sample Invoke method highlighted in blue and declared inside the declaration for the main window of the Java application. Note that 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