Forum Discussion
1222tmiller
15 years agoOccasional Contributor
Still not working the way I need it too. Made some progress
We create the Login screen and then create the application once we get a good response from the login screen.
begin
if TfrmPidiLogin.Execute then begin
Application.Initialize;
Application.ShowMainForm := False;
Application.CreateForm(TfrmMainClientGui, frmMainClientGui);
Application.Run;
end;
end.
So what I want to do is show the login screen, fill in the appropriate info, try to login, wait until IsConnected is = true.
Even though the WaitProperty is the last line for the login screen object, it runs first. So nothing happens.
If I take this line out, for some reason the next line works fine, even though there is no create page step. It doesn't respond to the "True" happening, so do I need to wrap it around a while? What would the syntax for that be?
procedure Login_NormalLogin;
var demo : OleVariant;
var tfrmPidiLogin : OleVariant;
var rzMaskEdit : OleVariant;
begin
TestedApps.DEMO.Run(1, true);
demo := Aliases.DEMO;
tfrmPidiLogin := aclu.frmPidiLogin;
rzMaskEdit := tfrmPidiLogin.pnlUserPass.edtPassword;
rzMaskEdit.Click(18, 12);
rzMaskEdit.Keys('xxyyzz');
tfrmPidiLogin.pnlButtons.btnConnect.Click(50, 7);
// Make sure the connection has been completed
tfrmPidiLogin.WaitProperty('IsConnected', true, 30000);
// Make sure the initialization process of passing data between
// the program and the middle tier has completed.
demo.frmMainClientGui.WaitProperty('IsInitialized', true, 50000);
demo.frmMainClientGui.MainMenu.Click('[0]|[0]');
demo.TMessageForm.Yes.ClickButton;
end;
We create the Login screen and then create the application once we get a good response from the login screen.
begin
if TfrmPidiLogin.Execute then begin
Application.Initialize;
Application.ShowMainForm := False;
Application.CreateForm(TfrmMainClientGui, frmMainClientGui);
Application.Run;
end;
end.
So what I want to do is show the login screen, fill in the appropriate info, try to login, wait until IsConnected is = true.
Even though the WaitProperty is the last line for the login screen object, it runs first. So nothing happens.
If I take this line out, for some reason the next line works fine, even though there is no create page step. It doesn't respond to the "True" happening, so do I need to wrap it around a while? What would the syntax for that be?
procedure Login_NormalLogin;
var demo : OleVariant;
var tfrmPidiLogin : OleVariant;
var rzMaskEdit : OleVariant;
begin
TestedApps.DEMO.Run(1, true);
demo := Aliases.DEMO;
tfrmPidiLogin := aclu.frmPidiLogin;
rzMaskEdit := tfrmPidiLogin.pnlUserPass.edtPassword;
rzMaskEdit.Click(18, 12);
rzMaskEdit.Keys('xxyyzz');
tfrmPidiLogin.pnlButtons.btnConnect.Click(50, 7);
// Make sure the connection has been completed
tfrmPidiLogin.WaitProperty('IsConnected', true, 30000);
// Make sure the initialization process of passing data between
// the program and the middle tier has completed.
demo.frmMainClientGui.WaitProperty('IsInitialized', true, 50000);
demo.frmMainClientGui.MainMenu.Click('[0]|[0]');
demo.TMessageForm.Yes.ClickButton;
end;
Related Content
- 11 months ago
- 2 years ago
- 8 years ago
- 9 years ago