Contributions
Log.LockEvents(0)
I have set the Log.LockEvents(0); I have a code that checks if a form is visible on a while loop: while PX3000Client.TMessageForm3.visible do PX3000Client.TMessageForm3.OK.ClickButton; when the form is not visible anymore, I get an error message on the test log. ================================================== An error occurred when executing the "visible" method or property of the "TMessageForm3" object. The object or one of its parent objects was not found in the system. Tested Object ------------------ Alias: Aliases.PX3000Client.TMessageForm3 Mapping item: NameMapping.Sys.PX3000Client.TMessageForm3 Missing Object ------------------ Alias: Aliases.PX3000Client.TMessageForm3 Mapping item: NameMapping.Sys.PX3000Client.TMessageForm3 Is there a method of preventing this error from being posted on the log? Thanks in advance. Albert15KViews0likes2Comments- 806Views0likes0Comments
Unexpected window
I'm running a script and have made a provision to trap an unexpected window. Within the debugger, I can see that the script is going thru the GeneralEvents_OnUnexpectedWindow procedure. Within the said procedure too I can also see the script closing the Unexpected window, then unexpected window closes but I error message "The operation cannot be completed due to an unexpected window." Stop on Error is not checked. Everything on the On Unexpected Window option section is also unchecked. Not sure why the script terminates. Please advise. Thanks in advance. Albert13KViews0likes2CommentsRe: ADO createparameter - TestComplete sample DelphiScript
Nope. I did not use Double Quotes in my code. TESTCOMPLETE example for DelphiScript using ADO createparameter does not work with MicroSoft SQL server 2008. There has to be a different way of declaring parameters in the commandtext.1.7KViews0likes0CommentsADO createparameter - TestComplete sample DelphiScript
I have this simple code below. It basically connects to a DB and tries to execute a SQL statement with one parameter (MyParam). I tried following one of you Delphi Script examples but I am getting an SQL error stating that I have an invalid column name "MyParam". Please see attached. Is there a more update example for doing this? Thanks in advance. Albert =========================================== procedure TestADOSelect; var AConnection, RecSet, Cmd, Prm : OleVariant; begin ADOConnect(AConnection); try // Create a new Command object Cmd := ADO.CreateCommand; // Specify the connection Cmd.ActiveConnection := AConnection; // Specify command type and text Cmd.CommandText := 'Select * from SIBInvoices where Organization_Id = MyParam'; Cmd.CommandType := adCmdText; // Create a new parameter Prm := Cmd.CreateParameter('MyParam', adInteger, adParamInput); Cmd.Parameters.Append(Prm); // Specify the parameter value Prm.Size := 5; Prm.Value := 99274; // Execute the command RecSet := Cmd.Execute; // Process the results RecSet.MoveFirst; while not aqConvert.VarToBool(RecSet.EOF) do RecSet.MoveNext; finally AConnection.Close; end; end; procedure ADOConnect(var AConnection: OleVariant); begin // Create a new Connection object AConnection := ADO.CreateConnection; // Specify the connection string Connection.ConnectionString := 'Provider=SQLOLEDB.1;' + 'Password=password;' + 'Persist Security Info=True;' + 'User ID=sa;' + 'Initial Catalog=TEST;' + Data Source=DEVSERV'; AConnection.Open; end;20KViews0likes3Commentsobject does not exist
I have a Delphi App that creates TPanels on the fly. The specific form, makes a TPanel visible after clicking a particular button. In that TPanel are several TButtons that need to be clicked or pressed. I was recording the script to test this specific form. But when running the back the script, I always get the message waiting for Object. Then I get Object Does not Exist. The script terminates after receiving the said message. Under the debugger, if you try to query for the existence of the that TPanel and those TButtons, the exist property for all of them is set to false, yet they are all visible and you can manually click on the said TButtons. TestComplete is not able to perform a ClickButton because it cannot find the object. How are we suppose to handle this? Thank you in advance. Albert19KViews0likes2CommentsNameMapping
I have a windows application named PX3000Client. Created testscripts for it and everything works. Decided to include debug informations within the applications and renamed the app to PX3000Client_Debug. I changed the following in the scripts: TestedApps.PX3000Client.Run(1, true); PX3000Client := Aliases.PX3000Client; panel := PX3000Client.frmLogon4.panelConnectAndMessage.panelConnection.panelInput; panel.editPassword.wText := 'test'; panel.btnConnect.ClickButton; to TestedApps.PX3000Client_Debug.Run(1, true); // added the _Debug PX3000Client := Aliases.PX3000Client; panel := PX3000Client.frmLogon4.panelConnectAndMessage.panelConnection.panelInput; panel.editPassword.wText := 'test'; panel.btnConnect.ClickButton; After that, the application runs but the scripts don't work anymore. I think a have a problem with "PX3000Client := Aliases.PX3000Client" as far as NameMapping is concern. Is this still correct? How can I get the test script to work with a different application name? Thanks in advance. Albert18KViews0likes1Comment- 651Views0likes0Comments