Thank you Chris and Simon, it helped a lot,
I tried bothWaitWindow andWaitAliasChild, they worked quite fine.
Example of WaitWindow :
{------------------------------------------------------------------------------}
procedure AttenteFenetre;
var
p, w;
begin
p := Sys.Process('MyProgram');
w := p.WaitWindow('TFormMyForm', '*', -1, 100000);
if w.Exists then
begin
if aqObject.CheckProperty(Aliases.MyProgram.MyForm, 'Visible', 0, true) then
begin
Log.Picture(w, 'Message ok');
Aliases.MyProgram.MyForm.Close;
end;
end
else
Log.Warning('Message "non ok"')
end;
Example of WaitAliasChild :
{------------------------------------------------------------------------------}
function WaitAliasChildExample;
var AliasObj;
begin
AliasObj := Aliases.MyProgram;
if (AliasObj.WaitAliasChild('TFormMyForm', 100000).Exists ) then
Log.Message('OK')
else
Log.Error('Non-OK');
end;
{------------------------------------------------------------------------------}
But i just know how to do so only by the script, not with the Test Complete GUI.
I have another question if you don't mind : I noticed that in Tools\Playback\ there is a checkbox "Stop on errors". What are the benefits to let it checked ?