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?
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
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?
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.