Contributions
How TC names objects
I am running testComplete 7 and it seems like every time I walk away from my machine the scripting language changes. I worked for a few hours yesterday recording, editing, and successfully running scripts that looked like this: SiteName++; // Click create new site button toolStrip = explorer.mainToolStrip; toolStrip.ClickItem("&New"); Today I open testComplete and my script wont run at all. I recorded a script to see if there was something fundamentally wrong, and I got something that looked like this: wndWindowsForms10Window8app033c0d9d = esiMain.wndWindowsForms10Window8app033c0d9d; wndWindowsForms10Window8app033c0d9d.Click(407, 15); wndWindowsForms10Window8app033c0d9d.WindowsForms10Window8app033c0d9d.Click(15, 12); esiMain.wndWindowsForms10Window8app033c0d9d1.btnCancel.ClickButton(); Why are these names different? What has happened to my stuff? The program I have been testing didn't change, the script or testComplete didn't change, my machine didn't change. Why would everything suddenly gobananas?14KViews0likes1CommentwItemCount problems
Hello folks, I am trying to get the number of nodes that exist within a node. The application looks like this: - Site - - 1 - - 2 - - 3 I have tried a few different things, but nothing I type in is working and I'm out of ideas. This code works to expand the Site item: myApp.Explorer.toolStripContainer1.ToolStripContentPanel.splitContainer.SplitterPanel.browser.treeView.ExpandItem("|Site"); From what I can tell wItemCount returns an integer, but where would that fit into the ridiculously long string of stuff.things? Any help would be greatlyappreciated.12KViews0likes1CommentRe: Conditional if statements do not seem conditional
Currently I'm doing this: BtnRetreiveClose = Aliases["EsiMain"]["wndWindowsForms10Window8app033c0d9d5"]["WindowsForms10Window8app033c0d9d"]["WindowsForms10Window8app033c0d9d"]["btnClose"]; if (BtnRetreiveClose.VisibleOnScreen()) { } That crashes. However, when the code looks like this: if (Aliases["EsiMain"]["wndWindowsForms10Window8app033c0d9d5"]["WindowsForms10Window8app033c0d9d"]["WindowsForms10Window8app033c0d9d"]["btnClose"]["Exists"]) {} Everything works great. What is the difference between the two methods and why would it work any different?1.1KViews0likes0CommentsConditional if statements do not seem conditional
Hello folks. I have had only a few weeks time to play with TestComplete, but I am an experienced C programmer with a little java exposure. When I test this program I get one of these three dialog boxes randomly. Currently I am trying to use this code to click whichever button shows up to make the box go away. When the script runs it gets to the first if statement, gives and error that no object was found, but still tries to click the button like there was a button visible on the screen. For the life of me I cannot figure out why. while(1) { if(BtnConfirmOverWriteYes.VisibleOnScreen()) { BtnConfirmOverWriteYes.ClickButton(); break; } if(BtnConfirmOverWriteSiteOK.VisibleOnScreen()) { BtnConfirmOverWriteSiteOK.ClickButton(); break; } if(BtnNumberingDifferencesRetreive.VisibleOnScreen()) { BtnNumberingDifferencesRetreive.ClickButton(); break; } } I am writing this script in JavaScript. I think. Thanks for the help, Eric9.8KViews0likes4Comments