douglasrs89
11 years agoNew Contributor
Log.Picture don't take the correct picture before Runner.Stop(true)
I have one event but the action Log.Picture don't take the correct picture on the screen.
procedure GeneralEvents_OnLogError(Sender; LogParams);
var
autcom: OleVariant;
begin
Log.Picture(Sys.Desktop, '', '', pmHighest);
autcom := Sys.Process('autcom');
if autcom.Exists then
begin
while autcom.Exists do
begin
try
Sys.Process('autcom').Terminate;
except
Delay(1000);
end;
end;
end;
FB_LoginAutcom;
Runner.Stop(true);
end;
If i change to
procedure GeneralEvents_OnLogError(Sender; LogParams);
var
autcom: OleVariant;
begin
Log.Picture(Sys.Desktop, '', '', pmHighest);
Runner.Stop(true);
autcom := Sys.Process('autcom');
if autcom.Exists then
begin
while autcom.Exists do
begin
try
Sys.Process('autcom').Terminate;
except
Delay(1000);
end;
end;
end;
FB_LoginAutcom;
end;
He takes the correct picture but stop the event on Runner.Stop
If i dont use Log.Picture the TestComplete take own screen picture
procedure GeneralEvents_OnLogError(Sender; LogParams);
var
autcom: OleVariant;
begin
Log.Picture(Sys.Desktop, '', '', pmHighest);
autcom := Sys.Process('autcom');
if autcom.Exists then
begin
while autcom.Exists do
begin
try
Sys.Process('autcom').Terminate;
except
Delay(1000);
end;
end;
end;
FB_LoginAutcom;
Runner.Stop(true);
end;
If i change to
procedure GeneralEvents_OnLogError(Sender; LogParams);
var
autcom: OleVariant;
begin
Log.Picture(Sys.Desktop, '', '', pmHighest);
Runner.Stop(true);
autcom := Sys.Process('autcom');
if autcom.Exists then
begin
while autcom.Exists do
begin
try
Sys.Process('autcom').Terminate;
except
Delay(1000);
end;
end;
end;
FB_LoginAutcom;
end;
He takes the correct picture but stop the event on Runner.Stop
If i dont use Log.Picture the TestComplete take own screen picture