Interacting with Java Applet using SilkTest 21.0.1

I have installed SilkTest 21.0.1

I have installed Eclipse version 2023-12

System : Windows 11

Use case:

   I have an application where in if you navigate to a URL ( http://abcd:8080/jnlp.html), the browser downloads the jnlp file and we need to open the jnlp file using javaws. I have been able to automate the above steps using SilkTest but after the java applet opens( as a separate window

I have tried the below options:

objDesktop.attach("jp2laucnher.exe");

objDesktop.find("Window Caption name");

But to no avail.

Tags:

  • Suggested Answer

    0  

    Hi Kinshuke,

    It sounds like you are testing a Java WebStart application. When the Java application is launched, you likely need to add an application configuration for the Java application.

    Based on your code, it looks like you are using Silk4J, therefore you sould try the following:

    1. Run through the steps to launch the Java WebStart AUT
    2. When the Java AUT has launched, return to Eclipse
    3. Open the Silk4J menu and select "Edit Application Configurations"
    4. Click the "Add application configuration" link
    5. Select your Java application from the list
    6. Click OK
    7. Verify that you can now record locators/actions successfully

    Please note that for Java applications, Silk Test adds a command line pattern to the application configuration (this ensures that only specific Java applications are hooked by Silk Test). If your Java WebStart AUT changes the command line pattern each time it is launched, you may need to wildcard the dynamic part of the command line pattern or simply delete the command line pattern in its entirety, to ensure your application is recognized each time.

    Regards
    Robert