public void CreateEmailSource(string sourceName)
        {
            KeyboardCommands.SendTab();
            Playback.Wait(50);
            KeyboardCommands.SendKey("localhost");
            KeyboardCommands.SendTab();
            Playback.Wait(50);
            KeyboardCommands.SendKey("test");
            KeyboardCommands.SendTab();
            KeyboardCommands.SendKey("test");
            KeyboardCommands.SendTabs(2);
            Playback.Wait(50);
            KeyboardCommands.SendTabs(2);
            Playback.Wait(50);
            KeyboardCommands.SendEnter();
            SendKeys.SendWait("^[email protected]{TAB}");
            SendKeys.SendWait("[email protected]{TAB}");
            Playback.Wait(50);
            KeyboardCommands.SendEnter();
            Playback.Wait(5000);//wait for test
            ClickSave();

            KeyboardCommands.SendTabs(3);
            Playback.Wait(50);
            KeyboardCommands.SendKey(sourceName);
            Playback.Wait(50);
            KeyboardCommands.SendTab();
            KeyboardCommands.SendEnter();
        }
Example #2
0
        public void ClickHelpFeedback_Expected_FeedbackWindowOpens()
        {
            RibbonUIMap.ClickRibbonMenuItem("Feedback", 600);
            var dialogPrompt = StudioWindow.GetChildren()[0];

            if (dialogPrompt.GetType() != typeof(WpfWindow))
            {
                Assert.Fail("Error - Clicking the Feedback button does not create the Feedback Window");
            }

            KeyboardCommands.SendEnter();
            KeyboardCommands.SendEnter();

            // Wait for the init, then click around a bit

            // Click stop, then make sure the Feedback window has appeared.
            FeedbackUIMap.ClickStartStopRecordingButton();

            if (!FeedbackUIMap.DoesFeedbackWindowExist())
            {
                Assert.Fail("The Feedback window did not appear after the recording has been stopped.");
            }

            FeedbackUIMap.FeedbackWindow_ClickCancel();
        }
Example #3
0
        public void WizardUiTests_WebServiceWizard_WebServiceInputMappingsDeleteAll_ExpectedNoInputMappings()
        {
            string    newGuid           = Guid.NewGuid().ToString();
            string    remove            = newGuid.Remove(8);
            string    newWebserviceName = "WebService" + remove;
            const int WaitMs            = 50;

            //Open wizard
            RibbonUIMap.ClickNewWebService();
            KeyboardCommands.SendTabs(2, WaitMs);
            KeyboardCommands.SendDownArrows(1, WaitMs);
            KeyboardCommands.SendTabs(8, WaitMs);
            KeyboardCommands.SendDownArrows(1, WaitMs);
            KeyboardCommands.SendTabs(4, WaitMs);
            KeyboardCommands.SendDel();
            KeyboardCommands.SendTabs(2, WaitMs);
            KeyboardCommands.SendEnter(5000);
            KeyboardCommands.SendTabs(1, WaitMs);
            KeyboardCommands.SendEnter(1000);
            KeyboardCommands.SendTabs(3, WaitMs);
            KeyboardCommands.SendKey(newWebserviceName, WaitMs);
            KeyboardCommands.SendTabs(1, WaitMs);
            KeyboardCommands.SendEnter(2000);

            UITestControl theTab          = RibbonUIMap.CreateNewWorkflow(1500);
            UITestControl activityControl = ExplorerUIMap.DragResourceOntoWorkflowDesigner(theTab, newWebserviceName, "Unassigned");

            using (var activity = new DsfActivityUiMap(false)
            {
                Activity = activityControl, TheTab = theTab
            })
            {
                Assert.AreEqual(0, activity.GetInputMappingRows().Count);
            }
        }
Example #4
0
        public void DragASwitchIntoForEachExpectNotAddedToForEach()
        {
            // Create the workflow
            RibbonUIMap.CreateNewWorkflow();

            // Get some variables
            UITestControl theTab         = TabManagerUIMap.GetActiveTab();
            UITestControl theStartButton = WorkflowDesignerUIMap.FindControlByAutomationId(theTab, "Start");
            Point         workflowPoint1 = new Point(theStartButton.BoundingRectangle.X, theStartButton.BoundingRectangle.Y + 200);

            Point requiredPoint = WorkflowDesignerUIMap.GetPointUnderStartNode(theTab);

            requiredPoint.Offset(20, 20);

            // Drag a ForEach onto the Workflow
            ToolboxUIMap.DragControlToWorkflowDesigner(ToolType.ForEach, workflowPoint1, "For Each");

            // Open the toolbox, and drag the control onto the Workflow
            ToolboxUIMap.DragControlToWorkflowDesigner(ToolType.Switch, requiredPoint);
            // Cancel Decision Wizard
            if (WizardsUIMap.TryWaitForWizard(3000))
            {
                KeyboardCommands.SendTab();
                KeyboardCommands.SendTab();
                KeyboardCommands.SendEnter(100);

                Assert.Fail("Got dropped ;(");
            }
        }
Example #5
0
        public void ClickSaveButton(int numberOfTabsToSaveButton)
        {
            var wizard = StudioWindow.GetChildren()[0].GetChildren()[2];

            wizard.WaitForControlReady();
            KeyboardCommands.SendTabs(numberOfTabsToSaveButton, 200);
            KeyboardCommands.SendEnter();
            Playback.Wait(500);
        }
Example #6
0
 public void CreateDbService(string serviceName)
 {
     ClickFirstAction();
     ClickTestAction();
     KeyboardCommands.SendTabs(5);
     KeyboardCommands.SendEnter();
     KeyboardCommands.SendTabs(3);
     SendKeys.SendWait(serviceName);
     Playback.Wait(10);
     KeyboardCommands.SendEnter();
 }
        /// <summary>
        /// ClickAndTypeInNameTextbox - Use 'ClickAndTypeInNameTextboxParams' to pass parameters into this method.
        /// </summary>
        public void ClickAndTypeInNameTextbox(string textToType)
        {
            WizardsUIMap.WaitForWizard();
            #region Variable Declarations
            //UITestControl uIItemImage = this.UIBusinessDesignStudioWindow.GetChildren()[0].GetChildren()[0];
            #endregion

            KeyboardCommands.SendTabs(6, 150);
            KeyboardCommands.SendKey(textToType, 200);
            KeyboardCommands.SendDel();
            //MouseCommands.ClickPoint(new Point(145, 364), 100);
            KeyboardCommands.SendTabs(2, 150);
            KeyboardCommands.SendEnter();
        }
Example #8
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");
            }
        }
 public void SaveWebService(string serviceName)
 {
     //Web Service Details
     KeyboardCommands.SendTabs(8);
     Playback.Wait(500);
     KeyboardCommands.SendEnter();
     Playback.Wait(500);//wait for test
     KeyboardCommands.SendTab();
     KeyboardCommands.SendEnter();
     Playback.Wait(500);
     KeyboardCommands.SendTabs(3);
     KeyboardCommands.SendKey(serviceName);
     KeyboardCommands.SendTab();
     KeyboardCommands.SendEnter();
 }
Example #10
0
 public void CreateWebSource(string sourceUrl, string sourceName)
 {
     //Web Source Details
     KeyboardCommands.SendKey(sourceUrl);
     KeyboardCommands.SendTabs(3);
     Playback.Wait(100);
     KeyboardCommands.SendEnter();
     Playback.Wait(1000);
     WebSourceWizardUIMap.ClickSave();
     KeyboardCommands.SendTabs(3);
     KeyboardCommands.SendKey(sourceName);
     KeyboardCommands.SendTab();
     KeyboardCommands.SendEnter();
     Playback.Wait(1000);
 }
Example #11
0
        public void Decision_Intellisense_KeyboardSelect_DecisionTitleUpdatesCorrectly()
        {
            RibbonUIMap.CreateNewWorkflow();
            UITestControl theTab = TabManagerUIMap.GetActiveTab();

            VariablesUIMap.ClickScalarVariableName(0);
            SendKeys.SendWait("VariableName");

            ToolboxUIMap.DragControlToWorkflowDesigner(ToolType.Decision, WorkflowDesignerUIMap.GetPointUnderStartNode(theTab));
            Playback.Wait(5000);
            //------------Execute Test---------------------------
            _decisionWizardUiMap.SendTabs(5, 1000);
            _decisionWizardUiMap.SelectMenuItem(17, 2000);
            _decisionWizardUiMap.SendTabs(11, 1000);

            //First field
            _decisionWizardUiMap.GetFirstIntellisense("[[V");
            _decisionWizardUiMap.SendTabs(2, 1000);

            //Second field
            _decisionWizardUiMap.GetFirstIntellisense("[[V");
            _decisionWizardUiMap.SendTabs(1, 1000);

            //Third field
            _decisionWizardUiMap.GetFirstIntellisense("[[V");
            _decisionWizardUiMap.SendTabs(6, 1000);

            //Wait for wizard to close
            KeyboardCommands.SendEnter(1500);

            // Assert Decision Title Updates Correctly
            const string Expected = "If [[VariableName]] Is Between [[VariableName]] and [[VariableName]]";

            var getDecision     = WorkflowDesignerUIMap.FindControlByAutomationId(theTab, "FlowDecisionDesigner");
            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 keyboard to select intellisense results");
            }
            else
            {
                Assert.Fail();
            }
        }
Example #12
0
        public void WizardUiTests_WebServiceWizard_WebServiceInputMappings_ExpectedInputMappingsCreated()
        {
            string newGuid           = Guid.NewGuid().ToString();
            string remove            = newGuid.Remove(8);
            string newWebserviceName = "WebService" + remove;

            //Open wizard
            const int tabWait = 200;

            RibbonUIMap.ClickNewWebService();
            KeyboardCommands.SendTabs(2, tabWait);
            KeyboardCommands.SendDownArrows(1);
            KeyboardCommands.SendTabs(8, tabWait);
            KeyboardCommands.SendDownArrows(1); // first resource is faulty, we need the second ;)
            KeyboardCommands.SendTabs(4, tabWait);
            KeyboardCommands.SelectAllText();
            KeyboardCommands.SendDel();
            KeyboardCommands.SendKey("?[[a]]=[[b]][[c]]&[[d]]=[[f]]");
            KeyboardCommands.SendLeftArrows(2);
            KeyboardCommands.SendKey("e");
            KeyboardCommands.SendTabs(2, tabWait);
            KeyboardCommands.SendEnter(8000);
            KeyboardCommands.SendTabs(1, tabWait); // Test
            KeyboardCommands.SendEnter(5000);
            KeyboardCommands.SendTabs(3, tabWait);
            KeyboardCommands.SendKey(newWebserviceName);
            KeyboardCommands.SendTabs(1, tabWait);
            KeyboardCommands.SendEnter(2000);

            UITestControl theTab          = RibbonUIMap.CreateNewWorkflow(1500);
            UITestControl activityControl = ExplorerUIMap.DragResourceOntoWorkflowDesigner(theTab, newWebserviceName, "Unassigned");

            using (var activity = new DsfActivityUiMap(false)
            {
                Activity = activityControl, TheTab = theTab
            })
            {
                StringAssert.Contains(activity.GetInputMappingToServiceValue(1), "a");
                StringAssert.Contains(activity.GetInputMappingToServiceValue(2), "b");
                StringAssert.Contains(activity.GetInputMappingToServiceValue(3), "c");
                StringAssert.Contains(activity.GetInputMappingToServiceValue(4), "d");
                StringAssert.Contains(activity.GetInputMappingToServiceValue(5), "fe");
            }
        }
Example #13
0
 public void CreateDbSource(string sourcePath, string sourceName)
 {
     //KeyboardCommands.SendTab();
     KeyboardCommands.SendKey(sourcePath);
     KeyboardCommands.SendTab();
     KeyboardCommands.SendRightArrows(1);
     KeyboardCommands.SendTab();
     KeyboardCommands.SendKey(@"testuser");
     KeyboardCommands.SendTab();
     KeyboardCommands.SendKey("test123");
     KeyboardCommands.SendTab();
     KeyboardCommands.SendEnter();
     Playback.Wait(2500);
     KeyboardCommands.SendTab();
     KeyboardCommands.SendDownArrows(1);
     KeyboardCommands.SendTab();
     KeyboardCommands.SendEnter();
     KeyboardCommands.SendTabs(3);
     KeyboardCommands.SendKey(sourceName);
     KeyboardCommands.SendTab();
     KeyboardCommands.SendEnter();
     Playback.Wait(1500);
 }
Example #14
0
        public void WizardUiTests_WebServiceWizard_WebServiceInputMappingsCase3_ExpectedInputMappingsCreated()
        {
            string newGuid           = Guid.NewGuid().ToString();
            string remove            = newGuid.Remove(8);
            string newWebserviceName = "WebService" + remove;

            //Open wizard
            RibbonUIMap.ClickNewWebService();
            KeyboardCommands.SendTabs(2);
            KeyboardCommands.SendDownArrows(1);
            KeyboardCommands.SendTabs(8);
            KeyboardCommands.SendDownArrows(1);
            KeyboardCommands.SendTabs(4);
            KeyboardCommands.SelectAllText();
            KeyboardCommands.SendKey("[[foobar]]?a=[[a]]");
            KeyboardCommands.SendTabs(2);
            KeyboardCommands.SendEnter(5000);
            KeyboardCommands.SendTabs(1);
            KeyboardCommands.SendEnter(1000);
            KeyboardCommands.SendTabs(3);
            KeyboardCommands.SendKey(newWebserviceName);
            KeyboardCommands.SendTabs(1);
            KeyboardCommands.SendEnter(2000);

            UITestControl theTab          = RibbonUIMap.CreateNewWorkflow(1500);
            UITestControl activityControl = ExplorerUIMap.DragResourceOntoWorkflowDesigner(theTab, newWebserviceName, "Unassigned");

            using (var activity = new DsfActivityUiMap(false)
            {
                Activity = activityControl, TheTab = theTab
            })
            {
                Assert.AreEqual("a", activity.GetInputMappingToServiceValue(1));
                Assert.AreEqual("foobar", activity.GetInputMappingToServiceValue(2));
            }
        }
 /// <summary>
 /// Edits the source.
 /// </summary>
 public void EditSource()
 {
     KeyboardCommands.SendTabs(2);
     KeyboardCommands.SendEnter();
 }