EnterTextInto method

Applies to
TGUITestCase

Declaration
Procedure EnterTextInto(Control :TControl; Text :string);

Implementation

procedure TGUITestCase.EnterTextInto(Control: TControl; Text: string);
var
  i :Integer;
begin
  Assert(Control <> nil, 'No control');
  Control := FindParentWinControl(Control);
  if Control <> nil then
  begin
    for i := 1 to Length(Text) do
    begin
      PostMessage(TWinControl(Control).Handle, WM_CHAR, Ord(Text[i]), 0);
      Sleep(ActionDelay);
    end;
  end;
  Application.ProcessMessages;
End;


HTML generated by Time2HELP
http://www.time2help.com