Big news! The community will be moving to a new platform April 21. Read more.
Big news! The community will be moving to a new platform April 21. Read more.
Captain
Captain
216 views

Launching Java app from Silktest script rather than App Config

I was launching my Java App using the recorded settings in the Application Configurations settings Javaw.exe which worked OK.

I want to launch and run the app against any of my 4 environments so I have deleted the javaw.exe from the app config and added the following to the script using the same settings as the Javaw app:

Its executing the Try code below and not going down the Exception leg but the app is not launching. Any ideas?

Mark Smith.

Dim strLocator As String = "/UIAWindow[@caption='CT (CUTOVER) selektron - 4.00.00']"
Dim strExecutable As String = "C:\selektron\Control Tower E2E4 SIT\Control Tower E2E4 SIT\jre\bin\javaw.exe"
					
bControlTower =  New BaseState(strExecutable,strLocator)	
    With bControlTower
        .Executable = "C:\selektron\Control Tower E2E4 SIT\Control Tower E2E4 SIT\jre\bin\javaw.exe"
	.CommandLineArguments = "-Xms256m -Xmx1024m -jar ./selektronGUI.jar -config selektron_DC2_CUTOVER.xml"
	.WorkingDirectory = "C:\selektron\Control Tower E2E4 SIT\Control Tower E2E4 SIT\"
	.ExecutablePattern = "*\javaw.exe"
	.Locator = strLocator
	.CommandLinePattern = ""
    End With 

Try 
	wControlTower = bControlTower.Execute()		
Catch ex As Exception
	MsgBox("Application not loaded")
End Try 

 

0 Likes
2 Replies
Micro Focus Expert
Micro Focus Expert

Hi @Rosso 

It's difficult to say what's occurring in this instance if there is no error being thrown.

The locator string that you have defined shows "UIAWindow", this would typically indicate that the application is JavaFX based. Is this correct?

How do you launch your application manually with different environments?

Regards
Robert

Captain
Captain

Hi @RobertM I've managed to resolve the issue, I was looking at the run.bat file used to launch the app manually after reading you post and noticed that the XML file referenced by each envs bat file has a slightly difference name (nothing to do with env, just a slight random difference (so much for naming standard huh?)

have a great weekend and thanks for asking how I launch the app manually, it pushed me in the right direction.

Mark Smith.

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.