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 WorkflowDesigner_CodedUI_CopyAndPastingAndDeleteingActivity_CopyPasteAndDeleteWork() { //------------Setup for test-------------------------- RibbonUIMap.CreateNewWorkflow(); UITestControl theTab = TabManagerUIMap.GetActiveTab(); //Find the start point UITestControl theStartButton = WorkflowDesignerUIMap.FindControlByAutomationId(theTab, "Start"); Point workflowPoint1 = new Point(theStartButton.BoundingRectangle.X, theStartButton.BoundingRectangle.Y + 200); ToolboxUIMap.DragControlToWorkflowDesigner(ToolType.Assign, workflowPoint1); WorkflowDesignerUIMap.AssignControl_ClickLeftTextboxInRow(theTab, "Assign", 0); SendKeys.SendWait("Hello"); //Get Large View button WorkflowDesignerUIMap.OpenCloseLargeView(ToolType.Assign, theTab); //------------Execute Test--------------------------- SendKeys.SendWait("^c"); SendKeys.SendWait("^v"); //------------Assert Results------------------------- UITestControlCollection allControlsOnDesignSurface = WorkflowDesignerUIMap.GetAllControlsOnDesignSurface(theTab); IEnumerable <UITestControl> uiTestControls = allControlsOnDesignSurface.Where(c => c.Name == "DsfMultiAssignActivity"); Assert.IsTrue(uiTestControls.Count() == 2); SendKeys.SendWait("{DELETE}"); allControlsOnDesignSurface = WorkflowDesignerUIMap.GetAllControlsOnDesignSurface(theTab); uiTestControls = allControlsOnDesignSurface.Where(c => c.Name == "DsfMultiAssignActivity"); Assert.IsTrue(uiTestControls.Count() == 1); }