by  Adam S Saturday, October 22, 2016
When you are testing a Java application using either Swing or AWT you may run into some issues due to the environment. This article collects some of these common cases and provides the recommended solutions.

Java Bridge Installation

Unlike testing web or Windows applications, you need to install a special connector to test applications that use Java AWT or Swing GUI libraries. This is called the Java Bridge.

To install the Java Bridge you need to click on the Options ribbon and click on Java Settings. On older versions of Rapise (pre v5.0) it will be found in the Settings > Options > Tools > Java Settings menu. That brings up the Java bridge installation dialog box:

Select the various VMs listed that you will be using and click the Install button. It will display the following message if successful:

Verifying that the bridge is Installed

To verify that the bridge installed correctly, check that the following files have been installed inside your Java VM (typically found at C:\Program Files (x86)\Java\jre1.x.x_xxx):

  • lib\
  • lib\ext\jaccess.jar
  • lib\ext\smartestudio-bridge.jar

If you don't see all three of these files then it means the bridge was not installed correctly.

If that happens, don't worry, simply download the compressed folder attached to this article and manually extract the files into the lib folder of your Java VM installation.

Using the Sample Application (AUTJava)

To help you make sure that your environment is correctly setup and also to help you try out Rapise, we have a sample application called AUTJava (AUT = Application Under Test) that can be found in the folder: C:\Users\Public\Documents\Rapise\Samples\Java\AUTJAVA

To run the application, right-click on the x86run.cmd file and choose Run as Administrator.

If the application doesn't appear correctly then you may need to set the JAVA_HOME environment variable.

To do this, open up the Windows control panel and choose System > Advanced System Settings:

Click on the Environment Variables button:

Click on the option to add a System Variable and then add the following:

Variable = JAVA_HOME
Value = C:\Program Files (x86)\Java\jre1.x.x_xxx

(you will need to match the location of your actual Java VM)

Now you should be able to launch the AUTJava sample application.

To verify that Rapise is configured correctly, click on the SPY menu in Rapise and choose Java Spy.

Then click on the main Spy icon and the Java Spy will start up:

Click the CTRL+G button combination to start tracking and then move the mouse over one of the buttons in the sample application and click CTRL+G again.

You should see the following

Which shows that Rapise is able to see the AWT button (in this example) and its properties.

However if you see the following instead:

it means that you didn't run the sample application using "Run as Administrator", close the application and try again using "Run as Administrator" and you will see:

You are now ready to start testing your real application. Make sure to also start it using "Run as Administrator".


Selected files will be attached to any email sent on saving ticket.

file selected files selected  () Delete Selected

  • Created:
  • by:

Select files to upload

Or drag and drop files here

Uploading …
Upload More?
There was an error.
Try again?

Save to upload the selected file(s)

Article Info
  • Last Updated: 10/22/2016
  • Article ID: KB223
  • Views: 262