Contributions
Re: How to Execute SQL Stored Procedure with Parameters on TestComplete
Hi: I read through the article, but not sure this part:Call SProc.Parameters.AddParameter() SProc.Parameters.Items(0).name = "RETURN_VALUE" SProc.Parameters.Items(0).DataType = adInteger SProc.Parameters.Items(0).Direction = adParamReturnValue SProc.Parameters.Items(0).Value = Null For example: if I have a stored procedure A that has multiple parameter B, C, and D, then it has multiple lines of AddParameter function from 0 - 2? Another question, in the example script, there are multiple variables: DataType, Size, Direction, Value, what is the meaning of each one? If one of the paramater has value of XML format, how is it working?2.3KViews0likes1CommentHow to Execute SQL Stored Procedure with Parameters on TestComplete
Currently we need to run TestComplete to execute a stored procedure with parameters, when I run it in SQL MS, it looks like this: EXEC ar_sp_VarGroupUpdateXML @i_UserCode='mgb', @i_TerminalCode='', @i_TranCode='stdpr118mf', @i_XmlDoc=N'<VariantData> <VarGroups> <VarGroup typeCode="C" code="BYW" description="BYW" colorRGB="" numberOfVariants="1" numberOfDimensions="1" dimension1TypeValue="1" isUpdateRequired="true"/> </VarGroups> <VarCodes> <VarCode code="YELLOW3" description="Yellow 3" groupCode="BYW" groupDescription="" code1="" code2="" nrfCode="" colorRGB="" typeCode="C" isUpdateRequired="true" /> <VarCode code="YELLOW4" description="Yellow 4" groupCode="BYW" groupDescription="" code1="" code2="" nrfCode="" colorRGB="" typeCode="C" isUpdateRequired="true" /> </VarCodes> </VariantData>', @i_AuditMessage1=N'1D group [<GROUP_CODE_OLD>] has been created.', @i_AuditMessage2=N'1D group [<GROUP_CODE_OLD>] has been updated.', @i_AuditMessage3=N'Colour [<VAR_CODE>] in group [<GROUP_CODE_OLD>] has been created.', @i_AuditMessage4=N'Colour [<VAR_CODE>] in group [<GROUP_CODE_OLD>] has been updated.', @i_AuditMessage5=N'Colour [<VAR_CODE>] in group [<GROUP_CODE_OLD>] has been deleted.', @i_AuditMessage6=N'Colour [<VAR_CODE>] in group [<GROUP_CODE_OLD>] was moved to group [<GROUP_CODE_NEW>].' I read some documentations on web, the format looks like this: functionCreatingStoredProcedure() { varSProc; SProc = ADO.CreateADOStoredProc(); SProc.ConnectionString = "Provider=SQLNCLI;Server=SERVER_NAME;" + "Database=DATABASE_NAME;Uid=USER_NAME; Pwd=PASSWORD;"; SProc.ProcedureName = "dbo.SelectFromTable"; // Adding a return parameter SProc.Parameters.AddParameter(); SProc.Parameters.Items(0).name = "RETURN_VALUE"; SProc.Parameters.Items(0).DataType = ftInteger; SProc.Parameters.Items(0).Direction = pdReturnValue; SProc.Parameters.Items(0).Value =null; // Adding an in parameter: SProc.Parameters.AddParameter(); SProc.Parameters.Items(1).name = "TableName"; SProc.Parameters.Items(1).DataType = ftFixedChar; SProc.Parameters.Items(1).Size = 32; SProc.Parameters.Items(1).Value = "chicken"; // Adding an in parameter: SProc.Parameters.AddParameter(); SProc.Parameters.Items(2).name = "Fields"; SProc.Parameters.Items(2).DataType = ftFixedChar; SProc.Parameters.Items(2).Size = 32; SProc.Parameters.Items(2).Value = "Caption"; // Adding an out parameter /* SProc.Parameters.AddParameter(); SProc.Parameters.Items(2).name = "OutParamName"; SProc.Parameters.Items(2).DataType = ftSmallint; SProc.Parameters.Items(2).Direction = pdOutput; SProc.Parameters.Items(2).Value = null; */ // Running the procedure SProc.ExecProc(); I tried to use this format to execute SP, but it doesn't work, how should I execute SP with multiple parameters inside?Solved2.5KViews0likes3CommentsKey Method no longer working for Web Module
Currently we are testing Web Application with Web Module using TestComplete. I has a simple test case that login HeadOffice through login page. Here is my script: URL = "http://qa1-merch1/merchant/headoffice/test/login" Call Browsers.Item(btChrome).Run If Not Sys.WaitBrowser("chrome", 10000).Exists Then Browsers.Item(btChrome).Run(URL) Browsers.Refresh Else Browsers.Item(btChrome).Navigate(URL) Browsers.Refresh End If Sys.Browser("chrome").BrowserWindow(0).Maximize Set Browser = Sys.Browser("chrome") Set Panelroot = Browser.Page(URL).Panel("container").Panel("root") Set form = Panelroot.Panel(1).Panel(0).Form(0) Set User = form.Panel(0).Panel(0).Panel(0).Panel(0).Panel(0).Textbox(0) Call User.Keys("mgb") Set Password = form.Panel(0).Panel(1).Panel(0).Panel(0).Panel(0).PasswordBox(0) Call Password.Keys("wilko") Set LoginButton = form.Button("loginSubmitButton") Call LoginButton.ClickButton Delay "10000" Browser.Close I am using Keys Method to enter user and password, it doesn't work anymore. I replace it with SetText, it works fine. So it seems Keys Method no longer works for our web application, but it works fine with Desktop module. Is there any reason, and how can fix it?Solved1.9KViews0likes4CommentsRe: Unable to stop TestComplete process when click a button that is Disabled
What is the difference between Click and Click Button? I investigate on the UltraToolbarsDockArea, it has property wItems, Save button is embedded into UltraToolbarsDockArea. It is not a single button to click. The Method I can use is either Click or DblClick, but not ClickButton. As a result, no warning will popup After I click "Save" when it is disabled. Is there any alternative way to solve the problem. Thanks1.4KViews0likes1CommentUnable to stop TestComplete process when click a button that is Disabled
I am currently doing continuous intergration testing using TestComplete, when clicking a button that is disabled, TestComplete doesn't throw any error message and stop the process, it pass the test and go to next process, as a result, test failed on the next process. Should TestComplete automatically stop process and throw error when it click any buttons that is disabled, or is there any solution to add into script (for example, a event) that trigger TestComplete to stop when click a button that is disabled. I also attach partial of my scripts in here: Sub CreateStoreInv Call Call_Transaction("stdfi010mf") ... ... Call frmInventoryAdj.UltraToolbarsDockArea.ClickItem("Home|&File|&Save") If StartWinGUI.dlgInventoryAdjustment.btnYes.Exists Then StartWinGUI.dlgInventoryAdjustment.btnYes.ClickButton End If Call WaitExists(StartWinGUI.dlgInventoryAdjustment, 1000) If StartWinGUI.dlgInventoryAdjustment.btnOK.Exists Then StartWinGUI.dlgInventoryAdjustment.btnOK.ClickButton End If Next frmInventoryAdj.Close1.4KViews0likes4CommentsUnable to add extension to Google Chrome after version 68
I have TestComplete 12.50 used by my company, few days ago I accidentally removed TestComplete Test Extension on Google Chrome v68.0.3440.75 (64 bit), as a result I can't run functional test for web application any more. I tried many method: 1. Go toC:\Program Files (x86)\Common Files\SmartBear\tcCrExtension and dragtcCrExtension.crx tochrome://extensions/ after swith to Developer mode, it pop up Add extension window but no extension being added after click add extension. 2. Search onChrome Web storefor extension, no results 3. Delete TestComplete and reinstall again, No extension being automatically added to Google Chrome 4. Downloadtc_12_50_4142_Chrome68_patch and attach file to correct location following instructions. Still unable to run functional test for web applications. I am out of ideas, any ideas to solve this problem? ThanksSolved2.1KViews0likes4Comments