procedure Test1;
  var SATFolhaDePgto : OleVariant;
  var frmFolha : OleVariant;
  var frmDlg : OleVariant;
  var edit : OleVariant;
  var panel : OleVariant;
  var bitBtn : OleVariant;
begin
  SATFolhaDePgto := Aliases.SATFolhaDePgto;
  frmFolha := SATFolhaDePgto.FrmFolha;
  frmFolha.CmdImprimirFolhaDePonto.ClickButton;
  frmDlg := SATFolhaDePgto.FrmDlg;
  edit := frmDlg.Panel1.Edit2;
  edit.SetText('1');
  panel := frmDlg.Panel2;
  bitBtn := panel.CmdOK;
  bitBtn.ClickButton;
  edit.SetText('2');
  bitBtn.ClickButton;
  panel.CmdCancelar.ClickButton;
  SATFolhaDePgto.FrmDlgInformacao.Panel1.pnlRodape.btnNao.ClickButton;
  frmFolha.CmdShowItens.ClickButton;
  SATFolhaDePgto.FrmFolhaIt.CmdClose.ClickButton;
  frmFolha.CmdImprimirPgto.ClickButton;
  edit.SetText('1');
  bitBtn.ClickButton;
  SATFolhaDePgto.dlgImprimir.Close;
end;