ContributionsMost RecentMost LikesSolutionsRe: How do I ignore comments in XML Checkpoints? It's unfortunate that this scenario is not handled by TestComplete :( I did some reasearch and ended up using the following code, which seems to be working. It returns the given XML doc with comment nodes removed. var Node = { ELEMENT_NODE : 1, ATTRIBUTE_NODE : 2, TEXT_NODE : 3, CDATA_SECTION_NODE : 4, ENTITY_REFERENCE_NODE : 5, ENTITY_NODE : 6, PROCESSING_INSTRUCTION_NODE : 7, COMMENT_NODE : 8, DOCUMENT_NODE : 9, DOCUMENT_TYPE_NODE : 10, DOCUMENT_FRAGMENT_NODE : 11, NOTATION_NODE : 12 }; function getXMLDocWithoutComments(givenXMLFullPath) { var xmlDoc = new ActiveXObject("Msxml2.DOMDocument.3.0"); var objNodeList; xmlDoc.async = false; xmlDoc.load(givenXMLFullPath); if (xmlDoc.parseError.errorCode != 0) { var myErr = xmlDoc.parseError; } else { objNodeList = xmlDoc.childNodes; for (var i=0; i<objNodeList.length; i++) { if(objNodeList.item(i).nodeType == Node.COMMENT_NODE) { xmlDoc.removeChild( objNodeList.item(i) ); } } } return xmlDoc; } How do I ignore comments in XML Checkpoints? I am using XML Checkpoints and would like to ignore comments when comparing files. I've removed the comments from the XML Checkpoint store item, but I dynamically load the base document and that seems to overwrite this action. Here is my XML Checkpoint store. I have removed the comment field shown from this so that the compare would ignore it. At runtime, I load an expected file into the Checkpoint and check a given file against it. See the code below: XML.XMLCheckpointUsage.Document.load(expectedFilePath); var result = XML.XMLCheckpointUsage.Check(givenFilePath); The check fails because of an "Only Expected" comment. How do I make TestComplete ignore the comment in the dynamically-loaded document? SolvedTry-Catch for Click Methods I've written a jscript function for closing my application at the end of every test. It first tries to close the application by clicking buttons and, if that fails, calls the Close method. If the script fails to close the application through the UI, I don't want to log an error--just a warning. However, the script throws an error anyway. I tried surrounding in a Try/Catch, but I've learned that doesn't work with the TestComplete operations I'm performing. How should I go about this? Here's my script: try { Aliases.Informa_Cashiering_Client.CurrentTransaction.ApplicationWindow.Grid.FloatingContainerBorder.Grid.FloatingContainerHeader.Grid.stackPanel.Button_CloseApplication.ClickButton(); } catch (e) { Log.Warning("Unable to close through the UI"); } if(myProcess.Exists){ myProcess.Close(1000); } Re: Refactoring - Replacing operations in Keyword Tests will_fetherolf, So do you manage your test suites completely in scripts? If so, I need to decide if I should do that, too... having scripts calling scripts would be easier to refactor, but not as easy to read. It stinks that we have to make these tradeoffs with TestComplete. Re: Refactoring - Replacing operations in Keyword Tests It's very sad to see no suggestions and I fear you are right--there is no convenient way to update multiple keyword tests. This makes TestComplete very disappointing when it comes to managing large test suites. Re: Refactoring - Replacing operations in Keyword Tests Good morning. Does anyone know if there is a convenient way of doing this? Refactoring - Replacing operations in Keyword Tests I've created a new and better function for closing my application at the end of each test. I'd like to update all existing tests, which all currently end with clicking 2 buttons. I cannot find a way to search-and-replace these operations with the new operation I'd like to use in their place. Below is an illustration of what I want to do. Re: How do I click a grid row? Or, click a button in a cell? Thank you all for your suggestions. I had not been looking for the WPFObjects, which is where I eventually found what I needed. Here's what I came up with. function clickDetailsButtonAtIndex(index) { // use when specifying the row: WPFObject("RowControl", "", index) index++; Aliases.Informa_Cashiering_Client.CurrentTransaction.ApplicationWindow.Grid.FloatingContainerBorder.Grid.FloatingContainerBody.border.Grid.PART_ContainerContent.Grid.ContentControl.ViewTransactionsView.Grid.GridControl.TableView.HierarchyPanel.WPFObject("RowControl", "", index).WPFObject("CellsControl", "", 1).WPFObject("LightweightCellEditor", "", 1).WPFObject("ButtonEdit", "", 1).Click(); } This calls the Click() function on the button in the row specified by the index (I increment the index because I want the function to be 0-based). Thanks again! Re: How do I click a grid row? Or, click a button in a cell? I thought I replied before, but I guess it didn't go through... I've recorded the button click and converted it to script. Below is the result. //Clicks the 'PART_Item' button. Aliases.Informa_Cashiering_Client.CurrentTransaction.ApplicationWindow.Grid.FloatingContainerBorder.Grid.FloatingContainerBody.border.Grid.PART_ContainerContent.Grid.ContentControl.ViewTransactionsView.Grid.GridControl.TableView.HierarchyPanel.RowControl.CellsControl.LightweightCellEditor.ButtonEdit.ButtonContainer.PART_Item.ClickButton(); Below is the system FullName of the object. Sys.Process("Informa.Cashiering.Client").WPFObject("HwndSource: ApplicationWindow", "Informa Cashiering - aa (Location: Test Agency1 | Station: 24)").WPFObject("ApplicationWindow", "Informa Cashiering - aa (Location: Test Agency1 | Station: 24)", 1).WPFObject("Grid", "", 1).WPFObject("FloatingContainerBorder").WPFObject("Grid", "", 1).WPFObject("FloatingContainerBody").WPFObject("border").WPFObject("Grid", "", 1).WPFObject("PART_ContainerContent").WPFObject("Grid", "", 1).WPFObject("ContentControl", "", 1).WPFObject("ViewTransactionsView", "", 1).WPFObject("Grid", "", 1).WPFObject("GridControl", "", 1).WPFObject("TableView", "", 1).WPFObject("HierarchyPanel", "", 1).WPFObject("RowControl", "", 1).WPFObject("CellsControl", "", 1).WPFObject("LightweightCellEditor", "", 1).WPFObject("ButtonEdit", "", 1).WPFObject("ButtonContainer", "", 1).WPFObject("PART_Item") I'd like to be able to perform this click through a function with a given row. Re: How do I click a grid row? Or, click a button in a cell? leandroaraujoso, Thank you for the reply. I recorded the action and converted it to script, shown below. //Clicks the 'PART_Item' button. Aliases.Informa_Cashiering_Client.CurrentTransaction.ApplicationWindow.Grid.FloatingContainerBorder.Grid.FloatingContainerBody.border.Grid.PART_ContainerContent.Grid.ContentControl.ViewTransactionsView.Grid.GridControl.TableView.HierarchyPanel.RowControl.CellsControl.LightweightCellEditor.ButtonEdit.ButtonContainer.PART_Item.ClickButton(); In addition, here is the FullName of the object in the system. Sys.Process("Informa.Cashiering.Client").WPFObject("HwndSource: ApplicationWindow", "Informa Cashiering - aa (Location: Test Agency1 | Station: 23)").WPFObject("ApplicationWindow", "Informa Cashiering - aa (Location: Test Agency1 | Station: 23)", 1).WPFObject("Grid", "", 1).WPFObject("FloatingContainerBorder").WPFObject("Grid", "", 1).WPFObject("FloatingContainerBody").WPFObject("border").WPFObject("Grid", "", 1).WPFObject("PART_ContainerContent").WPFObject("Grid", "", 1).WPFObject("ContentControl", "", 1).WPFObject("ViewTransactionsView", "", 1).WPFObject("Grid", "", 1).WPFObject("GridControl", "", 1).WPFObject("TableView", "", 1).WPFObject("HierarchyPanel", "", 1).WPFObject("RowControl", "", 1).WPFObject("CellsControl", "", 1).WPFObject("LightweightCellEditor", "", 1).WPFObject("ButtonEdit", "", 1).WPFObject("ButtonContainer", "", 1).WPFObject("PART_Item") I would like a function that can click this button for a given row.