Contributions
Killing a process from Task Manager
Hi, I want to kill a exe from windows task manager. I used WMI. Following is the code Killprocess = "CPR_GUI.exe" Set ProcessList = GetObject("winmgmts://.").InstancesOf("win32_process") ProcessList = GetObject("winmgmts://.").InstancesOf("win32_process") For Each Process In ProcessList Process ProcessList If Process.Name = KillProcess Then Process.Name = KillProcess Process.Terminate End If Next im getting an error n line 2 OLE Error 80041002 and a vbscript runtime error. all I want to do is kill CPR_GUI exe using test complete. If anyone has done this without error, please let me know how did you acheive it. Regards Smita25KViews0likes3CommentsRe: How to retrive data from WPF datagrid through TestComplete
Hi Alex, Im working on the same problem that Prachi is. I have a WPF Grid with classname "Infragistics.Windows.DataPresenter.RecordListControl" and the Rows are identified as DataRecordPresenter. The cell value headers are filters and they also appear as a row in the Grid. So it is difficult to find a value for a specific header.The Row indexes also change . Let me know if you can suggest how to identify these headers and columns uniquely and get a value of it in a variable. Regards Smita3.2KViews0likes0CommentsUnable to uniquely identify objects on a WPFGrid
Hi, We are working with a WPFGrid object which has Infragistic objects nested in it witht he following hierarchy, Sys.Process("Passport").WinFormsObject("WorkspaceWindowHost").WinFormsObject("_workspacePanel").WinFormsObject("ElementHost", "").WPFObject("HwndSource: AdornerDecorator", "").WPFObject("AdornerDecorator", "", 1).WPFObject("AvalonAdapter", "", 1).WPFObject("Workspace", "", 1).WPFObject("_containerGrid").WPFObject("Grid", "", 1).WPFObject("DockPanel", "", 2).WPFObject("_dockingSite").WPFObject("DockPanel", "", 1).WPFObject("x29374abfc5f6533a", "", 1).WPFObject("_documentContainer").WPFObject("SplitContainer", "", 1).WPFObject("WindowGroup", "", 1).WPFObject("DockableWindow", "", 1).WPFObject("_blotter").WPFObject("_rootGrid").WPFObject("_mainGrid").WPFObject("_mainGridsChildGrid").WPFObject("_grid").WPFObject("Grid", "", 1).WPFObject("RecordListControl", "", 1).WPFObject("DataRecordPresenter", "", 4).WPFObject("DataRecordCellArea", "", 1).WPFObject("ContentItemGrid").WPFObject("CellValuePresenter", "4689.T", 2).WPFObject("XamMaskedEditor", "", 1) We are unable to Identify the XamMaskedEditor object uniquely. We also have filter combo boxes as headers and this appears as a DataRecordPresenter with the upperbound index and has the following hierarchy. Sys.Process("Passport").WinFormsObject("WorkspaceWindowHost").WinFormsObject("_workspacePanel").WinFormsObject("ElementHost", "").WPFObject("HwndSource: AdornerDecorator", "").WPFObject("AdornerDecorator", "", 1).WPFObject("AvalonAdapter", "", 1).WPFObject("Workspace", "", 1).WPFObject("_containerGrid").WPFObject("Grid", "", 1).WPFObject("DockPanel", "", 2).WPFObject("_dockingSite").WPFObject("DockPanel", "", 1).WPFObject("x29374abfc5f6533a", "", 1).WPFObject("_documentContainer").WPFObject("SplitContainer", "", 1).WPFObject("WindowGroup", "", 1).WPFObject("DockableWindow", "", 1).WPFObject("_blotter").WPFObject("_rootGrid").WPFObject("_mainGrid").WPFObject("_mainGridsChildGrid").WPFObject("_grid").WPFObject("Grid", "", 1).WPFObject("RecordListControl", "", 1).WPFObject("DataRecordPresenter", "", 10).WPFObject("HeaderPresenter", "", 1).WPFObject("HeaderLabelArea", "", 1).WPFObject("VirtualizingDataRecordCellPanel", "", 1).WPFObject("LabelPresenter", "Side", 1).WPFObject("_filterCombo").WPFObject("AdornerLayer", "", 1) We have to match the CellValuePresenter WPFControlOrdinalNo with the LabelPresenter "side" WPFControlOrdinalNo to know that the value in CellValuePresenter is the value for "Side" Label at a given row. Since we do not have a cell header we have to work on ordinals and these are not fixed. We need to know what approach we can take to fix this problem. As I have seen if the filter on the grid changes the indexes change too. Please advise.16KViews0likes1Comment