WaitForWizard() 공개 메소드

Returns true if found in the timeout period.
public WaitForWizard ( int timeOut = DefaultTimeOut, bool throwIfNotFound = true ) : void
timeOut int
throwIfNotFound bool
리턴 void
예제 #1
0
        // 05/11 - Failure is Intermittent ;)
        public void DecisionWizard_Save_WhenMouseUsedToSelect2ndAnd3rdInputFields_FieldDataSavedCorrectly()
        {
            //------------Setup for test--------------------------
            RibbonUIMap.CreateNewWorkflow();

            var theTab = TabManagerUIMap.GetActiveTab();

            //------------Execute Test---------------------------
            VariablesUIMap.EnterTextIntoScalarName(0, "VariableName");

            var pt = WorkflowDesignerUIMap.GetPointUnderStartNode(theTab);

            ToolboxUIMap.DragControlToWorkflowDesigner(ToolType.Decision, pt);
            WizardsUIMap.WaitForWizard();
            Assert.AreEqual("Decision Flow", WizardsUIMap.GetLeftTitleText());
            _decisionWizardUiMap.SendTabs(5, 500);
            _decisionWizardUiMap.SelectMenuItem(17, 100); // select between ;)

            _decisionWizardUiMap.SendTabs(11, 500);
            _decisionWizardUiMap.GetFirstIntellisense("[[V", false, new Point(100, 120));

            _decisionWizardUiMap.SendTabs(2, 500);
            _decisionWizardUiMap.GetFirstIntellisense("[[V", false, new Point(400, 120));
            _decisionWizardUiMap.SendTabs(1, 500);
            _decisionWizardUiMap.GetFirstIntellisense("[[V", false, new Point(600, 120));

            _decisionWizardUiMap.SendTabs(6, 500);
            KeyboardCommands.SendEnter();

            //------------Assert Results-------------------------

            const string expected = "If [[VariableName]] Is Between [[VariableName]] and [[VariableName]]";

            var getDecision = WorkflowDesignerUIMap.FindControlByAutomationId(theTab, "FlowDecisionDesigner");

            getDecision.WaitForControlEnabled();
            var getDecisionText = getDecision.GetChildren()[0] as WpfEdit;

            if (getDecisionText != null)
            {
                var displayValue = getDecisionText.Text;

                Assert.AreEqual(expected, displayValue,
                                "Decision intellisense doesnt work when using the mouse to select intellisense results");
            }
            else
            {
                Assert.Fail("Null decision");
            }
        }
예제 #2
0
        public void CopyDecisionsWithContextMenuAndPasteExpectedNoWizardsDisplayed()
        {
            //Initialize
            Clipboard.SetText(" ");
            RibbonUIMap.CreateNewWorkflow();
            UITestControl theTab = TabManagerUIMap.GetActiveTab();

            //Drag on two decisions
            ToolboxUIMap.DragControlToWorkflowDesigner(ToolType.Decision, WorkflowDesignerUIMap.GetPointUnderStartNode(theTab));
            WizardsUIMap.WaitForWizard();

            _decisionWizardUiMap.HitDoneWithKeyboard();
            var newPoint = WorkflowDesignerUIMap.GetPointUnderStartNode(theTab);

            newPoint.Y = newPoint.Y + 200;

            var clickPoint = new Point(newPoint.X, newPoint.Y);

            ToolboxUIMap.DragControlToWorkflowDesigner(ToolType.Decision, newPoint);
            WizardsUIMap.WaitForWizard(7000);

            _decisionWizardUiMap.HitDoneWithKeyboard();

            //Rubber-band select them
            var startDragPoint = WorkflowDesignerUIMap.GetPointUnderStartNode(theTab);

            startDragPoint.X = startDragPoint.X - 100;
            startDragPoint.Y = startDragPoint.Y - 100;
            Mouse.Move(startDragPoint);
            newPoint.X = newPoint.X + 100;
            newPoint.Y = newPoint.Y + 100;
            Mouse.StartDragging();
            Mouse.StopDragging(newPoint);
            startDragPoint.X = startDragPoint.X + 150;
            startDragPoint.Y = startDragPoint.Y + 150;
            Mouse.Click(MouseButtons.Right, ModifierKeys.None, clickPoint);
            var designSurface = WorkflowDesignerUIMap.GetFlowchartDesigner(theTab);

            SendKeys.SendWait("{DOWN}{DOWN}{ENTER}");
            Mouse.Click(designSurface);
            SendKeys.SendWait("^v");
            UITestControl uIItemImage = DatabaseServiceWizardUIMap.UIBusinessDesignStudioWindow.GetChildren()[0].GetChildren()[0];

            // Assert
            Assert.AreEqual("System Menu Bar", uIItemImage.FriendlyName);
        }