Contributions
How do I control "Notepad" that my program opens.
If you have a problem connecting to our system, we automatically do an IP Trace and show it in Notepad. For the test script to complete, I need to close it. (using Delphi Script). How do I get a handle to a program that is already running? How do I do a Wait for it to open (see my example below)? How do I close the program gracefully? This is what I do in other areas for a wait while (MyApp.FrmErrorDlg.Exists = false) do aqUtils.Delay(1000); // 1 sec delay hopefully can do something like while (Sys.Process("Notepad").Exists = false) do aqUtils.Delay(1000); // 1 sec delay11KViews0likes1CommentRe: TC 8 Unable to recognize passowrd text box
I am having a similar problem after upgrading to 8. here is my code: procedure Login_NormalLogin; var aclu : OleVariant; var tfrmPidiLogin : OleVariant; var rzMaskEdit : OleVariant; var aIsInit : boolean; begin TestedApps.MyApp.Run(1, true); MyAppInstance := Aliases.MyApp; tfrmPidiLogin := MyAppInstance.frmPidiLogin; rzMaskEdit := tfrmPidiLogin.pnlUserPass.edtPassword; rzMaskEdit.Click(1, 12); rzMaskEdit.Keys('xxxyyyzzz'); tfrmPidiLogin.pnlButtons.btnConnect.Click(); All I get are timeout errors not being able to find the objects.730Views0likes0CommentsRe: How do I use a custom property on my main form
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;836Views0likes0CommentsHow do I use a custom property on my main form
Delphi 2007, Windows 7, Test Complete 7 My first test I am trying to write is for the login screen. Want to test some different scenarios. Once the main form is shown, the system goes off and does a lot of stuff. I need for the test script to wait for all the initialization stuff to complete before closing the window. We have some things that run in OnShow and a custom AfterShow event. So I added a property InitializationComplete. So I tried to add a wait based on MainForm.InitializationComplete = true. It errors out as not being able to find the new property. Every attempt to use the wizard to find the main form object so I can select the custom property InitializationComplete fails. Any one have any suggestion?11KViews0likes3Comments