/// <summary> /// SimulatronUITest - Use 'SimulatronUITestParams' to pass parameters into this method. /// </summary> public void SimulatronUITest() { #region Variable Declarations WinButton uIShowdesktopButton = this.UIItemWindow.UIShowdesktopButton; WpfCheckBox uICheckBoxCheckBox = this.UISimulatronWindowWindow.UICheckBoxCheckBox; WpfExpander uITemperatureExpander = this.UISimulatronWindowWindow.UITemperatureExpander; WpfButton uIResetButton = this.UISimulatronWindowWindow.UIResetButton; WinWindow uISimulatronWindowWindow1 = this.UISimulatronWindowWindow1; WpfTitleBar uISimulatronWindowTitleBar = this.UISimulatronWindowWindow.UISimulatronWindowTitleBar; #endregion // Click 'Show desktop' button Mouse.Click(uIShowdesktopButton, new Point(40, 12)); // Launch 'D:\Media\Univer\Labs\Git\IDE\Lab#2\Lab2\Lab2\bin\Debug\Lab2.exe' ApplicationUnderTest uISimulatronWindowWindow = ApplicationUnderTest.Launch(this.SimulatronUITestParams.UISimulatronWindowWindowExePath, this.SimulatronUITestParams.UISimulatronWindowWindowAlternateExePath); // Select 'CheckBox' check box uICheckBoxCheckBox.Checked = this.SimulatronUITestParams.UICheckBoxCheckBoxChecked; // Expand 'Temperature' expander uITemperatureExpander.Expanded = this.SimulatronUITestParams.UITemperatureExpanderExpanded; // Click 'Reset' button Mouse.Click(uIResetButton, new Point(32, 16)); // Double-Click 'SimulatronWindow' window Mouse.DoubleClick(uISimulatronWindowWindow1, new Point(1034, 343)); // Click 'SimulatronWindow' title bar Mouse.Click(uISimulatronWindowTitleBar, new Point(1137, -1)); }
public void ClickOnCreateNewTestClass() { WpfControl installedDatagrid = new WpfControl(newprojectwindow); installedDatagrid.SearchProperties[WpfControl.PropertyNames.ControlType] = "DataItem"; installedDatagrid.SearchProperties[WpfControl.PropertyNames.AutomationId] = "Installed"; WpfExpander expand = new WpfExpander(installedDatagrid); WpfTree installedTreeView = new WpfTree(expand); installedTreeView.SearchProperties.Add(WpfTree.PropertyNames.AutomationId, "Installed"); WpfTreeItem tempTreeItem = new WpfTreeItem(installedTreeView); tempTreeItem.SearchProperties.Add(WpfTreeItem.PropertyNames.AutomationId, "Templates"); WpfTreeItem visualCtreeItem = new WpfTreeItem(tempTreeItem); visualCtreeItem.SearchProperties.Add(WpfTreeItem.PropertyNames.AutomationId, "Visual C#"); expand.Expanded = true; WpfTreeItem testTreeItem = new WpfTreeItem(visualCtreeItem); testTreeItem.SearchProperties.Add(WpfTreeItem.PropertyNames.AutomationId, "Test"); Mouse.Click(testTreeItem); }