Esempio n. 1
0
        public void ModifiedSimpleAppTest()
        {
            #region Variable Declarations
            WpfButton   uIStartButton      = this.UIMainWindowWindow.UIStartButton;
            WpfCheckBox uICheckBoxCheckBox = this.UIMainWindowWindow.UICheckBoxCheckBox;
            #endregion

            // Click 'Start' button
            Mouse.Click(uIStartButton, new Point(36, 7));

            uICheckBoxCheckBox.WaitForControlEnabled();
            // Select 'CheckBox' check box
            uICheckBoxCheckBox.Checked = this.SimpleAppTestParams.UICheckBoxCheckBoxChecked;
        }
Esempio n. 2
0
        /// <summary>
        /// SimpleAppTest - Use 'SimpleAppTestParams' to pass parameters into this method.
        /// </summary>
        public void ModifiedSimpleAppTest()
        {
            #region Variable Declarations
            WpfButton   uIButtonButton     = this.UIMainWindowWindow.UIButtonButton1;
            WpfCheckBox uICheckBoxCheckBox = this.UIMainWindowWindow.UICheckBoxCheckBox;
            WinButton   uICloseButton      = this.UIMainWindowWindow1.UICloseButton;
            #endregion

            // Click 'Button' button
            Mouse.Click(uIButtonButton, new Point(46, 14));

            uICheckBoxCheckBox.WaitForControlEnabled();

            // Select 'CheckBox' check box
            uICheckBoxCheckBox.Checked = this.SimpleAppTestParams.UICheckBoxCheckBoxChecked;

            // Click 'Close' button
            Mouse.Click(uICloseButton, new Point(50, 35));
        }
Esempio n. 3
0
        public void ModifiedButtonClick()
        {
            #region Variable Declarations
            WpfButton   uIStartButton      = this.UIMainWindowWindow.UIStartButton;
            WpfCheckBox uICheckBoxCheckBox = this.UIMainWindowWindow.UICheckBoxCheckBox;
            #endregion

            // Launch '%USERPROFILE%\source\repos\SimpleWPFApplication\SimpleWPFApplication\bin\Debug\SimpleWPFApplication.exe'
            ApplicationUnderTest uIMainWindowWindow = ApplicationUnderTest.Launch(this.ButtonClickParams.UIMainWindowWindowExePath,
                                                                                  this.ButtonClickParams.UIMainWindowWindowAlternateExePath);

            // Click 'Start' button
            Mouse.Click(uIStartButton, new Point(50, 8));

            uICheckBoxCheckBox.WaitForControlEnabled();

            // Select 'CheckBox' check box
            uICheckBoxCheckBox.Checked = this.ButtonClickParams.UICheckBoxCheckBoxChecked;
        }
Esempio n. 4
0
        /// <summary>
        /// SimpleTestMethod - Use 'SimpleTestMethodParams' to pass parameters into this method.
        /// </summary>
        public void Modified1SimpleTestMethod()
        {
            #region Variable Declarations
            WpfButton   uIStartButton      = this.UIMainWindowWindow.UIStartButton;
            WpfCheckBox uICheckBoxCheckBox = this.UIMainWindowWindow.UICheckBoxCheckBox;
            WinButton   uICloseButton      = this.UIMainWindowWindow1.UICloseButton;
            #endregion

            // Launch '%USERPROFILE%\Desktop\101604238\Week 9\SimpleWPFApp\SimpleWPFApp\bin\Debug\SimpleWPFApp.exe'
            ApplicationUnderTest uIMainWindowWindow = ApplicationUnderTest.Launch(this.SimpleTestMethodParams.UIMainWindowWindowExePath, this.SimpleTestMethodParams.UIMainWindowWindowAlternateExePath);

            // Click 'Start' button
            Mouse.Click(uIStartButton, new Point(54, 11));

            uICheckBoxCheckBox.WaitForControlEnabled();
            // Select 'CheckBox' check box
            uICheckBoxCheckBox.Checked = this.SimpleTestMethodParams.UICheckBoxCheckBoxChecked;

            // Click 'Close' button
            Mouse.Click(uICloseButton, new Point(32, 12));
        }
Esempio n. 5
0
        /// <summary>
        /// SimpleAppTest - Use 'SimpleAppTestParams' to pass parameters into this method.
        /// </summary>
        public void ModifiedSimpleAppTest()
        {
            #region Variable Declarations
            WpfButton   uIStartButton      = this.UIMainWindowWindow.UIStartButton;
            WpfCheckBox uICheckBoxCheckBox = this.UIMainWindowWindow.UICheckBoxCheckBox;
            WinButton   uICloseButton      = this.UIMainWindowWindow1.UICloseButton;
            #endregion

            // Launch '%USERPROFILE%\Source\Repos\UITesting\SimpleWPFApp\SimpleWPFApp\bin\Debug\SimpleWPFApp.exe'
            ApplicationUnderTest uIMainWindowWindow = ApplicationUnderTest.Launch(this.SimpleAppTestParams.UIMainWindowWindowExePath, this.SimpleAppTestParams.UIMainWindowWindowAlternateExePath);

            // Click 'Start' button
            Mouse.Click(uIStartButton, new Point(65, 14));
            //added
            uICheckBoxCheckBox.WaitForControlEnabled();
            // Select 'CheckBox' check box
            uICheckBoxCheckBox.Checked = this.SimpleAppTestParams.UICheckBoxCheckBoxChecked;

            // Click 'Close' button
            Mouse.Click(uICloseButton, new Point(43, 20));
        }
Esempio n. 6
0
        /// <summary>
        /// SimpleAppTest - Use 'SimpleAppTestParams' to pass parameters into this method.
        /// </summary>
        //    public void ModifiedSimpleAppTest()
        //    {
        //        #region Variable Declarations
        //        WpfButton uIStartButton = this.UIMainWindowWindow.UIStartButton;
        //        WinWindow uIMainWindowWindow1 = this.UIMainWindowWindow1;
        //        WpfCheckBox uICheckBoxCheckBox = this.UIMainWindowWindow.UICheckBoxCheckBox;
        //        WinButton uICloseButton = this.UIMainWindowWindow1.UICloseButton;
        //        #endregion

        //        // Launch '%USERPROFILE%\Documents\DIPLOMA\C#-WED\WK11-AdvUnitTest\AdvUnitTest\SimpleWPFApp\bin\Debug\SimpleWPFApp.exe'
        //        ApplicationUnderTest uIMainWindowWindow = ApplicationUnderTest.Launch(this.SimpleAppTestParams.UIMainWindowWindowExePath, this.SimpleAppTestParams.UIMainWindowWindowAlternateExePath);

        //        // Click 'Start' button
        //        Mouse.Click(uIStartButton, new Point(59, 2));

        //        // Maximize window 'MainWindow'
        //        uIMainWindowWindow1.Maximized = this.SimpleAppTestParams.UIMainWindowWindow1Maximized;

        //        //uICheckBoxCheckBox.WaitForControlEnabled();
        //        // Select 'CheckBox' check box
        //        uICheckBoxCheckBox.Checked = this.SimpleAppTestParams.UICheckBoxCheckBoxChecked;

        //        // Restore window 'MainWindow'
        //        uIMainWindowWindow1.Restored = this.SimpleAppTestParams.UIMainWindowWindow1Restored;

        //        // Click 'Close' button
        //        Mouse.Click(uICloseButton, new Point(33, 16));
        //    }

        //    public virtual SimpleAppTestParams SimpleAppTestParams
        //    {
        //        get
        //        {
        //            if ((this.mSimpleAppTestParams == null))
        //            {
        //                this.mSimpleAppTestParams = new SimpleAppTestParams();
        //            }
        //            return this.mSimpleAppTestParams;
        //        }
        //    }

        //    private SimpleAppTestParams mSimpleAppTestParams;
        //}
        ///// <summary>
        ///// Parameters to be passed into 'SimpleAppTest'
        ///// </summary>
        //[GeneratedCode("Coded UITest Builder", "15.0.26208.0")]
        //public class SimpleAppTestParams
        //{

        //    #region Fields
        //    /// <summary>
        //    /// Launch '%USERPROFILE%\Documents\DIPLOMA\C#-WED\WK11-AdvUnitTest\AdvUnitTest\SimpleWPFApp\bin\Debug\SimpleWPFApp.exe'
        //    /// </summary>
        //    public string UIMainWindowWindowExePath = "C:\\Users\\madhu\\Documents\\DIPLOMA\\C#-WED\\WK11-AdvUnitTest\\AdvUnitTest\\SimpleWPFApp" +
        //        "\\bin\\Debug\\SimpleWPFApp.exe";

        //    /// <summary>
        //    /// Launch '%USERPROFILE%\Documents\DIPLOMA\C#-WED\WK11-AdvUnitTest\AdvUnitTest\SimpleWPFApp\bin\Debug\SimpleWPFApp.exe'
        //    /// </summary>
        //    public string UIMainWindowWindowAlternateExePath = "%USERPROFILE%\\Documents\\DIPLOMA\\C#-WED\\WK11-AdvUnitTest\\AdvUnitTest\\SimpleWPFApp\\" +
        //        "bin\\Debug\\SimpleWPFApp.exe";

        //    /// <summary>
        //    /// Maximize window 'MainWindow'
        //    /// </summary>
        //    public bool UIMainWindowWindow1Maximized = true;

        //    /// <summary>
        //    /// Select 'CheckBox' check box
        //    /// </summary>
        //    public bool UICheckBoxCheckBoxChecked = true;

        //    /// <summary>
        //    /// Restore window 'MainWindow'
        //    /// </summary>
        //    public bool UIMainWindowWindow1Restored = true;
        //    #endregion

        /// <summary>
        /// SimpleAppTest - Use 'SimpleAppTestParams' to pass parameters into this method.
        /// </summary>
        public void ModifiedSimpleAppTest()
        {
            #region Variable Declarations
            WpfButton   uIStartButton      = this.UIMainWindowWindow.UIStartButton;
            WpfCheckBox uICheckBoxCheckBox = this.UIMainWindowWindow.UICheckBoxCheckBox;
            WinButton   uICloseButton      = this.UIMainWindowWindow1.UICloseButton;
            #endregion

            // Launch '%USERPROFILE%\Documents\DIPLOMA\C#-WED\WK11-AdvUnitTest\AdvUnitTest\SimpleWPFApp\bin\Debug\SimpleWPFApp.exe'
            ApplicationUnderTest uIMainWindowWindow = ApplicationUnderTest.Launch(this.SimpleAppTestParams.UIMainWindowWindowExePath, this.SimpleAppTestParams.UIMainWindowWindowAlternateExePath);

            // Click 'Start' button
            Mouse.Click(uIStartButton, new Point(23, 6));

            uICheckBoxCheckBox.WaitForControlEnabled();
            // Select 'CheckBox' check box
            uICheckBoxCheckBox.Checked = this.SimpleAppTestParams.UICheckBoxCheckBoxChecked;

            // Click 'Close' button
            Mouse.Click(uICloseButton, new Point(22, 3));
        }
Esempio n. 7
0
        /// <summary>
        /// RecordedMethod1 - Use 'RecordedMethod1Params' to pass parameters into this method.
        /// </summary>
        public void ModifiedRecordedMethod1()
        {
            #region Variable Declarations
            WpfButton   uIStartButton      = this.UIMainWindowWindow.UIStartButton;
            WpfCheckBox uICheckBoxCheckBox = this.UIMainWindowWindow.UICheckBoxCheckBox;
            WinButton   uICloseButton      = this.UIMainWindowWindow1.UICloseButton;
            #endregion

            // Launch '%USERPROFILE%\source\repos\DipSWDWeek9SubTask_CodedUITests\SimpleWPFApp\bin\Debug\SimpleWPFApp.exe'
            ApplicationUnderTest uIMainWindowWindow = ApplicationUnderTest.Launch(this.RecordedMethod1Params.UIMainWindowWindowExePath, this.RecordedMethod1Params.UIMainWindowWindowAlternateExePath);

            // Click 'Start' button
            Mouse.Click(uIStartButton, new Point(39, 12));

            uICheckBoxCheckBox.WaitForControlEnabled();

            // Select 'CheckBox' check box
            uICheckBoxCheckBox.Checked = this.RecordedMethod1Params.UICheckBoxCheckBoxChecked;

            // Click 'Close' button
            Mouse.Click(uICloseButton, new Point(24, 20));
        }
Esempio n. 8
0
        /// <summary>
        /// RecordedMethod1 - Use 'RecordedMethod1Params' to pass parameters into this method.
        /// </summary>
        public void NewRecordedMethod1()
        {
            #region Variable Declarations
            WpfButton   uIButtOnButton       = this.UIMainWindowWindow.UIButtOnButton;
            WpfCheckBox uICheckBoxCheckBox   = this.UIMainWindowWindow.UICheckBoxCheckBox;
            WinTitleBar uIMainWindowTitleBar = this.UIMainWindowWindow1.UIMainWindowTitleBar;
            #endregion

            // Launch '%USERPROFILE%\source\repos\UI_Testing_102058205\UI_Testing_102058205\bin\Debug\UI_Testing_102058205.exe'
            ApplicationUnderTest uIMainWindowWindow = ApplicationUnderTest.Launch(this.RecordedMethod1Params.UIMainWindowWindowExePath, this.RecordedMethod1Params.UIMainWindowWindowAlternateExePath);

            // Click 'Butt On' button
            Mouse.Click(uIButtOnButton, new Point(46, 28));

            // Select 'CheckBox' check box

            uICheckBoxCheckBox.WaitForControlEnabled();
            uICheckBoxCheckBox.Checked = this.RecordedMethod1Params.UICheckBoxCheckBoxChecked;

            // Click 'MainWindow' title bar
            Mouse.Click(uIMainWindowTitleBar, new Point(767, 15));
        }
Esempio n. 9
0
        /// <summary>
        /// RecordedMethod1 - Use 'RecordedMethod1Params' to pass parameters into this method.
        /// </summary>
        public void ModifiedRecordedMethod1()
        {
            #region Variable Declarations
            WpfButton   uIStartButton        = this.UIMainWindowWindow2.UIStartButton;
            WpfCheckBox uICheckBoxCheckBox   = this.UIMainWindowWindow2.UICheckBoxCheckBox;
            WinTitleBar uIMainWindowTitleBar = this.UIMainWindowWindow3.UIMainWindowTitleBar;
            #endregion

            // Launch 'C:\proj\dipswd-ui-testing\DipSWDUITesting\bin\Debug\DipSWDUITesting.exe'
            ApplicationUnderTest uIMainWindowWindow2 = ApplicationUnderTest.Launch(this.RecordedMethod1Params.UIMainWindowWindow2ExePath, this.RecordedMethod1Params.UIMainWindowWindow2AlternateExePath);

            // Click 'Start' button
            Mouse.Click(uIStartButton, new Point(63, 16));

            // Wait for checkbox to become enabled
            uICheckBoxCheckBox.WaitForControlEnabled();

            // Select 'CheckBox' check box
            uICheckBoxCheckBox.Checked = this.RecordedMethod1Params.UICheckBoxCheckBoxChecked;

            // Click 'MainWindow' title bar
            Mouse.Click(uIMainWindowTitleBar, new Point(758, 15));
        }