Sahi - Java Web Start Automation

abstract This section details how to test Java Web Start Automation.
If you are not familiar with Sahi Pro, please see Quick Tutorial on Sahi Pro

Introduction

Sahi Pro Desktop Add-on provides support for automation of Java Web Start Application.

Installation

Download Sahi Pro and Sahi Pro Desktop Add-on from Downloads Archive.
Install Sahi Pro into a folder without spaces in its path.
Then install Sahi Pro Desktop Add-on into the same folder as Sahi Pro.
For details about installation please refer here

License

Sahi Pro Desktop Add-on needs a separate license from Sahi Pro.
Register here for a 30 day fully functional trial version.

Recording Java Web Start

  1. Open a command prompt and cd to sahi/userdata/bin
    (or click on the "Bin" link on the Sahi Dashboard)
  2. Invoke java_web_start.bat with the jnlp application path to start the application
    (Download and save the JNLP application on local filesystem before hand.)

    D:\Sahi_Pro\userdata\bin>java_web_start.bat <ApplicationPath>\<ApplicationName>.jnlp

  3. From the Sahi Dashboard, open any browser and launch the Controller.
    You can now start recording.
    Like normal Sahi Pro for web pages, you can use CTRL-Hover to identify various elements on the Java Web Start application.

info Security Settings

If the web start application is not behaving as expected, you might need to set Java security settings as follows:
  1. Find the <JAVA_HOME>\lib\security\javaws.policyfile.
  2. Edit the file with these settings:
  3. grant codeBase "file:${jnlpx.home}/javaws.jar" {
    permission java.security.AllPermission;
    };
    
    grant {
    permission java.security.AllPermission;
    };

Scripting Notes