On Mon, Sep 7, 2009 at 12:04 PM, franz<maciej....@gmail.com> wrote:
> one instance of my application will be running during test. So my
> question is how to "pull the plug" and be sure that after test was
> executed the application would be closed
Killing the jvm is not a good option if your application runs in the
same virtual machine as the Robot. It will close Robot abruptly and no
logs will be generated. In your case I would recommend trying the new
"Close All Dialogs" keyword [1].
The other option is to use ApplicationLauncher [2] which starts your
SUT in a separate jvm and contains "Close Application" keyword. I
don't recommend using ApplicationLauncher though if it is not
absolutely necessary as it will slow down the test execution somewhat
and bring more complexity to your test setup.
[1] http://robotframework-swinglibrary.googlecode.com/svn/tags/swinglibrary-1.0/doc/swinglibrary-1.0-doc.html#Close%20All%20Dialogs
[2] http://code.google.com/p/robotframework-javatools/wiki/ApplicationLauncher
Best regards,
Heikki