public void RightClickDeleteResource(string resourceName, string categoryName, string serverName) { EnterExplorerSearchText(resourceName); UITestControl theControl = null; if (categoryName != "Unassigned" && categoryName != string.Empty) { theControl = VisualTreeWalker.GetChildByAutomationIdPath(_explorerTree, serverName, categoryName, resourceName); } else { theControl = VisualTreeWalker.GetChildByAutomationIdPath(_explorerTree, serverName, resourceName); } Point p = new Point(theControl.BoundingRectangle.X + 100, theControl.BoundingRectangle.Y + 5); Mouse.Move(p); Playback.Wait(500); Mouse.Click(MouseButtons.Right, ModifierKeys.None, p); Playback.Wait(1000); SendKeys.SendWait("{DOWN}"); Playback.Wait(100); SendKeys.SendWait("{DOWN}"); Playback.Wait(100); SendKeys.SendWait("{DOWN}"); Playback.Wait(100); SendKeys.SendWait("{DOWN}"); Playback.Wait(100); SendKeys.SendWait("{ENTER}"); PopupDialogUIMap.WaitForDialog(); Playback.Wait(100); var confirmationDialog = UIBusinessDesignStudioWindow.GetChildren()[0]; var yesButton = confirmationDialog.GetChildren().FirstOrDefault(c => c.FriendlyName == "Yes"); Mouse.Click(yesButton, new Point(10, 10)); }
public void AddResource(string resourceName, string category, string folder) { UITestControl addResourceGrid = _activeTab.GetChildByAutomationIDPath(_resourceGridPath); var kids = addResourceGrid.GetChildren(); var foundIt = false; if (kids.Count >= 2) { var theRow = kids[1]; var grandKids = theRow.GetChildren(); if (grandKids.Count > 0) { // 0 = header var magicCell = grandKids[1]; var grandGrandKids = magicCell.GetChildren(); if (grandGrandKids.Count == 2) { var addResourceButton = grandGrandKids[1]; addResourceButton.Click(); PopupDialogUIMap.WaitForDialog(); PopupDialogUIMap.AddAResource("localhost", category, folder, resourceName); foundIt = true; } } } if (!foundIt) { throw new Exception("Failed to locate resource picker button"); } }
public void DragToolOntoDesigner(ToolType toolType, Point pointToDragTo = new Point()) { if (toolType == ToolType.Workflow || toolType == ToolType.Service) { ToolboxUIMap.DragControlToWorkflowDesigner(toolType, TheTab, new Point(), false); PopupDialogUIMap.WaitForDialog(); } else { Activity = ToolboxUIMap.DragControlToWorkflowDesigner(toolType, TheTab); } }
public void DebugBuriedErrors_Expected_OnlyErrorStepIsInError() { //Open the correct workflow ExplorerUIMap.EnterExplorerSearchText("Bug8372"); ExplorerUIMap.DoubleClickOpenProject("localhost", "TestCategory", "Bug8372"); // Run debug RibbonUIMap.ClickRibbonMenuItem("Debug"); PopupDialogUIMap.WaitForDialog(); DebugUIMap.ClickExecute(); OutputUIMap.WaitForExecution(); var result = OutputUIMap.IsAnyStepsInError(); // Get nested steps Assert.IsTrue(result, "Cannot see nested error steps in the debug output."); }
public void DebugAWorkFlow_EnsureSaveIsEnabledAfterCompletion() { ExplorerUIMap.EnterExplorerSearchText("ServiceExecutionTest"); ExplorerUIMap.DoubleClickOpenProject("localhost", "TestCategory", "ServiceExecutionTest"); PopupDialogUIMap.WaitForDialog(); KeyboardCommands.SendKey("{F5}"); PopupDialogUIMap.WaitForDialog(); KeyboardCommands.SendKey("{F6}"); PopupDialogUIMap.WaitForDialog(); var uiControl = RibbonUIMap.GetControlByName("Save"); uiControl.WaitForControlReady(); Assert.IsTrue(uiControl.Enabled); }
public void RemoteServerUITests_ViewRemoteWorkFlowInBrowser_WorkflowIsExecuted() { ExplorerUIMap.DoubleClickWorkflow("Find Records", "TESTS", RemoteServerName); KeyboardCommands.SendKey("{F7}"); PopupDialogUIMap.WaitForDialog(); //assert error dialog not showing var child = StudioWindow.GetChildren()[0]; if (child != null) { Assert.IsNotInstanceOfType(child.GetChildren()[0], typeof(Window)); } else { Assert.Fail("Cannot get studio window after remote workflow show in browser"); } //Try close browser ExternalUIMap.CloseAllInstancesOfIE(); }
public void DebugOutput_ClickStep_ActivityIsHighlighted() { //Create testing workflow RibbonUIMap.CreateNewWorkflow(); var theTab = TabManagerUIMap.GetActiveTab(); //Drag on multiassign UITestControl theStartButton = WorkflowDesignerUIMap.FindControlByAutomationId(theTab, "Start"); var thePoint = new Point(theStartButton.BoundingRectangle.X + 30, theStartButton.BoundingRectangle.Y + 90); ToolboxUIMap.DragControlToWorkflowDesigner(ToolType.Assign, thePoint); WorkflowDesignerUIMap.AssignControl_ClickLeftTextboxInRow(theTab, "Assign", 0); //Set up multi assign SendKeys.SendWait("[[AssignThis]]{TAB}Some Data"); //run and wait until debug output comes through RibbonUIMap.ClickRibbonMenuItem("Debug"); PopupDialogUIMap.WaitForDialog(); DebugUIMap.ClickExecute(); OutputUIMap.WaitForExecution(); //Click step var step = OutputUIMap.GetOutputWindow(); Playback.Wait(1500); Mouse.Click(step[2]); Playback.Wait(100); Mouse.Click(step[1]); Playback.Wait(100); Mouse.Click(step[2]); Playback.Wait(100); //Assert the design surface activity is highlighted var assign = WorkflowDesignerUIMap.FindControlByAutomationId(theTab, "Assign"); Assert.IsTrue(WorkflowDesignerUIMap.IsControlSelected(assign), "Selecting a step in the debug output does not select the activity on the design surface"); }
public void RightClickRemoveResource(string resourceName, string categoryName, string serverName) { EnterExplorerSearchText(resourceName); UITestControl theControl = GetServiceItem(serverName, categoryName, resourceName); Point p = new Point(theControl.BoundingRectangle.X + 100, theControl.BoundingRectangle.Y + 5); Mouse.Move(p); Playback.Wait(500); Mouse.Click(MouseButtons.Right, ModifierKeys.None, p); Playback.Wait(1000); SendKeys.SendWait("{DOWN}"); Playback.Wait(100); SendKeys.SendWait("{DOWN}"); Playback.Wait(100); SendKeys.SendWait("{DOWN}"); Playback.Wait(100); SendKeys.SendWait("{ENTER}"); PopupDialogUIMap.WaitForDialog(); Playback.Wait(100); var confirmationDialog = UIBusinessDesignStudioWindow.GetChildren()[0]; var yesButton = confirmationDialog.GetChildren().FirstOrDefault(c => c.FriendlyName == "Yes"); Mouse.Click(yesButton, new Point(10, 10)); }