JRuby execution not returned to test script after launching app
07 Jan 2014, 07:11
Kim Faint (1 post)
I am currently working on the example in Section 2.3, Swing with JRuby. I have completed the example with JunqueNote and Jemmy, that works fine. But now I am trying to apply the same technique to another Java application. The problem I have is when I launch the app in the test script, execution is not returned to the script.
I extracted the main jar file of the app and inspected the META-INF\MANIFEST.MF file to get the Main-Class.
I then modified jruby_basics.rb into the following test.rb which launches the app by creating an instance of the Main-Class:
Because the app is normally launched by a batch file that passes some arguments to the JVM in order for it to run and also changes directories, I have created a test.bat file that passes the same arguments via jruby -J options:
So this all works up until test.rb #(4). At this point the app has launched and the login dialog is displayed. But then the print statement at #(5) never appears and execution never returns to the test script.
Do you have any alternate strategies I could try for starting the app in a different way?
14 Feb 2014, 23:41
Ian Dees (195 posts)
Sorry to hear of the trouble. Jemmy may be having trouble matching the login dialog by its Java class; does it help to change the dialog line to the following?
|You must be logged in to comment|