How do i close any application using Script Comand
How do i close any application using Script Comand and i dont want to use TestObject for achieving this.
i want it to be something like we have with the opening of application.startApp("");
Re: How do i close any application using Script Comand
the startApp("") return a ProcessTestObject object, keep a reference to this while you testing the application then when you want to close the opened application just call :
If you are under windows and even linux you may write a OSCommand wrapper which deals with java Runtime and Process (plenty examples on the net) object to kick of OS specific commands, one way I did succeed on windows to close any other application is with wmic (http://technet.microsoft.com/en-us/l.../bb742610.aspx), then you call might look like :
OSCommand.run("wmic process where (CommandLine=\"javaw -mx1024M -Djava.net.preferI..blablabla") delete");
or under linux OSCommand.run("kill -9 pid");