function funValidaDialog(sMensagem):boolean;
var
ObjProcesso, ObjJanela, ObjMensagem;
begin
ObjProcesso:=Sys.Process('sige2');
ObjJanela:=nil;
ObjMensagem:=nil;
Indicator.PushText('Verificando se a mensagem que contém: "'+sMensagem+'" existe...');
ObjJanela := ObjProcesso.WaitWindow('#32770','X' , -1, 5000);
if ObjJanela.Exists then
begin
ObjMensagem := ObjJanela.WaitWindow('Static', sMensagem, 2, 1000);
if ObjMensagem.Exists then
begin
Result:=True;
end
else
begin
Result:=False;
end;
end
else
begin
Result:=False;
end;
Indicator.PopText;
end;this is my code so far...
Now, the message that I want to see during the whole process is: "Verificando se a mensagem que contém: "X" existe..."
But all I can see is: "Waiting for Window: WndClass - "#32770", WndCaption - "X" " because the Test Runner posts another message after I post my message, and thats why I want to temporarily disable the automatic messages...
And that happens when my executable's message box doesnt exists...