Delphi Unit Test

1

I'm implementing DUnit in the company and my question is this: is there any way to do the click of the button for a "ShowMessage" of a form I get, but I would like it when the showmessage window appears, I could program the click of this button automatically, with no user intervention. Someone knows if it is possible to do or have any different ideas.

Thanks in advance for your cooperation.

Leandro Passion

    
asked by anonymous 17.11.2015 / 12:11

1 answer

0
procedure TFProv_Principal.BitBtn1Click(Sender: TObject);
begin
Timer1.Interval := 3000; // Tempo que a msg ficará na tela -> 3 Segs
Timer1.Enabled := True;
MessageBox(Handle, PChar(´Testando MessageBox com tempo pré-definido.´), Pchar(´Titulo´), 8224);
end;

procedure TFProv_Principal.Timer1Timer(Sender: TObject);
begin
keybd_event(VK_RETURN,0,0,0);
Timer1.Enabled := False;
end;
    
17.11.2015 / 12:47