Forum Discussion
- AlexKaras
Champion Level 3
Hi,
.Terminate() method (Sys.Process('YourProcess').Terminate() ).
- tristaanogreEsteemed Contributor
AlexKaras wrote:
Hi,
.Terminate() method (Sys.Process('YourProcess').Terminate() ).
In addition to what AlexKaras has given you, I would suggest including in whatever code you're using to close your application under test to do some sort of checking. Something like
var myApp = Sys.WaitProcess('MyApp', 2000); if (myApp.Exists){ myApp.Terminate(); }
- m_essaidValued Contributor
hi,
I have this little piece of script that waits for a process to be killed :
procedure KillProcess(ProcessName: string);
var
p, IsClosed;
begin
p := Sys.FindChild('ProcessName', ProcessName);
while p.Exists do
begin
p.Close;
IsClosed:= p.WaitProperty('Exists', False);
if not IsClosed then
p.Terminate;
p:= Sys.FindChild('ProcessName', ProcessName);
end;
end;