ContributionsMost RecentMost LikesSolutionsRe: Object destroyed using .Keys in TestComplete 12 and TC12.5 What I found surprising is that this structure has been in our tests since TC9 and this structure has worked fine there and in TC10 and TC11 until TC12. The Delete is deleting text in a single field so that the next menu item can be entered. I don't believe that the screen is being refreshed. Additionally, when I removed the delete (It's not really needed since I'm am now using set_Text to enter the name of the next menu item), the object still gets destroyed by the .keys"[Enter]" on occasion. Thanks for your post. Re: Object destroyed using .Keys in TestComplete 12 and TC12.5 I believe I resolved the problem in my code by moving one line. It seems to be stable but since the issue is erratic, I'll have to watch it for a while. 'Enter the menu name, number or file name and run it If QADNetUI.Exists Then Set SearchBar = QADNetUI.FindChild("ClrClassName", "UltraTextEditor", 20) '<---moved this line into the If/Then With SearchBar .SelectAll() .keys"[Del]" delay 2000 Log.Message("Menu Number = " &strMenuNumber) .keys(strMenuNumber) delay 2000 .keys"[Enter]" End With delay 3000 Else Err.Raise 777, "selectMenu::QADNetUI.Exists", "Can not find SearchBar" End If Else Err.Raise 778, "selectMenu::WaitWinFormObject(QAD.Client, TimeOut)", "Can not find QADNetUI" End If Re: Object destroyed using .Keys in TestComplete 12 and TC12.5 Hi Shankar, It periodically gives the message "Window was destroyed during method execution." Your method for getting around the Del key is creative but I really don't need that step as I switch to using set_Text for the menu name. It still would get destroyed on the SearchBar.keys("[Enter]") in either case. I did notice that this time it said that the window was destroyed instead of the object. I have been getting both of those messages. I have a workaround that seems to work but it's not very pretty and I don't think it really needs to be this complicated. My main concern is that .keys for del or Enter seems to be unstable. For i = 1 to 4 ' 'Log.Enable = False bolStillExists = SearchBar.Exists ' 'Log.Enable = True If Not bolStillExists Then Log.Warning("SearchBar object was destroyed. Finding it again.") Set SearchBar = QADNetUI.FindChild("ClrClassName", "UltraTextEditor", 20) End If Select Case (i) Case 1: SearchBar.SelectAll() Case 2: SearchBar.keys("[Del]") delay 2000 Log.Message("Menu Number = " &strMenuNumber) Case 3: SearchBar.set_Text(strMenuNumber) delay 2000 Case 4: SearchBar.set_Text(strMenuNumber) delay 2000 SearchBar.keys("[Enter]") End Select Next Thanks for taking the time to help. Tony Biegen Object destroyed using .Keys in TestComplete 12 and TC12.5 I'm having an issue where a VBScript script worked fine for years in previous versions of TC but often, but not regularly fails in TC12 and TC12.5. The point where it fails is always using .keys. Here are parts of the function: function selectMenu(strMenuNumber,TimeOut) If Sys.WaitProcess("QAD.Client", TimeOut).WaitWinFormsObject("ShellForm", TimeOut).Exists Then Set QADNetUI = Sys.Process("QAD.Client").WinFormsObject("ShellForm") If QADNetUI.WaitWinFormsObject("MdiClient","", TimeOut).Exists Then Set MainGrid = QADNetUI.WinFormsObject("MdiClient","") Else Err.Raise 775,"selectMenu::WaitWinFormsObject(MdiClient, TimeOut)", "can not find MdiClient" exit function End If Set MenuBar = QADNetUI.WinFormsObject("pnlTopHeaderParent")._ WinFormsObject("pnlTopHeader").WinFormsObject("_mnuShellMenuBar")._ WinFormsObject("_ShellMenuBar_Toolbars_Dock_Area_Top") Set SearchBar = QADNetUI.FindChild("ClrClassName", "UltraTextEditor", 20) . . . 'Enter the menu name, number or file name and run it If QADNetUI.Exists Then With SearchBar .SelectAll() .keys"[Del]" delay 2000 Log.Message("Menu Number = " &strMenuNumber) .set_Text(strMenuNumber) delay 2000 .keys"[Enter]" End With delay 3000 Else Err.Raise 777, "selectMenu::QADNetUI.Exists", "Can not find SearchBar" End If Else Err.Raise 778, "selectMenu::WaitWinFormObject(QAD.Client, TimeOut)", "Can not find QADNetUI" End If End function The script often, but not always stops at either of the .keys lines with the message; "The object was destroyed during method execution." I have a workaround (it's kind of ugly), so I'm not looking for that. It just seems that TC12 and above has a problem with .keys that was not in earlier releases. I'm wondering if others are seeing this same behavior. Re: Would like to generalize a table comparison in VBScript Thank all of you for your speedy replies. This seemed to work for me in VBScript: strTableName = CompTable Set tblCheckpoint = aqObject.GetPropertyValue(Tables, strTableName) Call tblCheckpoint.Check Where CompTable is the parameter containing the name of the Table. Thanks again. Now I can have one script for all our browses changing just the criteria passed in and the appropriate table to compare the output. Would like to generalize a table comparison in VBScript Working with VBScrip tScripting. I am trying to create a general purpose script to run my browses and compare the output. Starting with: Call Tables.SDTCode1.Check I would like to use a parameter for "SDTCode1" so that this script can be generalized and used for all browses with just a change to the parameter containing the Table name. Tried a few different things but I must be missing something fairly easy. Any suggestions? SolvedCatching and freeing error messages I have a program that I'm testing that has a pop up that comes up sometiimes. IIf it comes up I have to click a button, if not, I just want ot go by it. I use this construct: '======= MessageArea ======= 'Message Information: Is this order revision change? Set se = FindChildByProperty(te,"FrameName","a",timeout) If te.WaitWinFormsObject("MessageArea").Exists then Call MessageBoxCheck(te,"Is this an order revision change","No",timeout) End If This let's me get past this in both cases (the box exists/ the box does not exist) without giving an error and let's me finish this loop through my test. However, it seems to still save that error. I go through my loop again starting at the top with another record. As I go from frame to frame I do an error check: Set se = FindChildByProperty(te,"FrameName","f_amts",timeout) if Err.number <> 0 then log.Error "["&Err.Source&"]:"&Err.Description exit sub end if On the first error check, the test stops and gives a message: [MessageBoxCheck::WaitWinFormsObject(Name,timeout)]:MessageBox pop-up fails 13:30:14 Normal This is the error that I avoided at the bottom of the loop and has nothing to do with the current check. So I added this to the bottom of the loop trying to clear the error: if Err.number <> 0 then Err.Clear end if This, oddly enough, gets me past the first frame check but I still get caught on the second frame check with the same error about the MessageBoxCheck. Thoughts? Ideas? Re: Data driven data with blank optional fieldsThanks for responding. I was hoping to find a solution that could be implemented without using scripting.Data driven data with blank optional fieldsI'm new to TestComplete. I have set up a NameMapping test and have included a Data-Driven Loop which I populate with data from an Excel spreadsheet. I was able to get this to work fine for my first set of data. I then added additional lines of data to load into the test. In our application some data fields are optional and therefor the values in the cells for those fields are blank. When I run the test with the data with blank fields I get error messages. I've read a number of the forum discussions about using Excel for data and I am aware of the limitation that all values in a column must be the same type of data. I was able to switch my data source to a CSV file easily, but I still get an exception "Type mismatch" on the first blank field in the data. Blank optional fields are valid in my application. How can I use data driven loops to load those records?