예제 #1
0
        /// <summary>
        /// Creat new meal
        /// </summary>
        public void CreateMeal(string mealName, string descrtiption)
        {
            #region Variable Declarations
            WpfButton uIHljedláButton   = this.UIMainWindowWindow1.UIHljedláButton;
            WpfButton uIPridaťButton    = this.UIMainWindowWindow1.UIFramePane.UIPridaťButton;
            WpfEdit   uIItemNameEdit    = this.UIMainWindowWindow1.UIItemNameEdit;
            WpfEdit   uIDescriptionEdit = this.UIMainWindowWindow1.UIDescriptionEdit;
            WpfButton uIUložiťButton    = this.UIMainWindowWindow1.UIUložiťButton;
            WpfButton uIZatvoriťButton  = this.UIMainWindowWindow1.UIZatvoriťButton;
            #endregion

            // Click 'Hl. jedlá' button
            Mouse.Click(uIHljedláButton, new Point(105, 16));

            // Click 'Pridať' button
            Mouse.Click(uIPridaťButton, new Point(38, 23));

            // Type 'Testovaci' in 'ItemName' text box
            uIItemNameEdit.Text = mealName;

            // Type '{Tab}' in 'ItemName' text box
            Keyboard.SendKeys(uIItemNameEdit, this.CreateMealParams.UIItemNameEditSendKeys, ModifierKeys.None);

            // Type 'Opis testovacieho jedla' in 'Description' text box
            uIDescriptionEdit.Text = descrtiption;

            // Click 'Uložiť' button
            Mouse.Click(uIUložiťButton, new Point(75, 13));

            // Click 'Zatvoriť' button
            Mouse.Click(uIZatvoriťButton, new Point(114, 23));
        }
예제 #2
0
        /// <summary>
        /// SendMail2 - Use 'SendMail2Params' to pass parameters into this method.
        /// </summary>
        public void SendMail2()
        {
            #region Variable Declarations
            WinTitleBar uIDebugTitleBar          = this.UIDebugWindow.UIDebugTitleBar;
            WinEdit     uINameEdit               = this.UIDebugWindow.UIItemWindow.UIDigital_docs_wpfListItem.UINameEdit;
            WpfEdit     uILoginBoxEdit           = this.UILoginViewWindow.UILoginBoxEdit;
            WpfEdit     uIPasswordBoxEdit        = this.UILoginViewWindow.UIPasswordBoxEdit;
            WpfButton   uISigninButton           = this.UILoginViewWindow.UISigninButton;
            WpfButton   uIFetchoffersButton      = this.UIUser1_NewTasksWindow.UIFetchoffersButton;
            WpfCell     uIMailSubject8832Cell    = this.UIUser1_NewTasksWindow.UIListViewTable.UIItemDataItem.UIMailSubject8832Cell;
            WpfCheckBox uIEmployee2CheckBox      = this.UIUser1_NewTasksWindow.UIEmployee2CheckBox;
            WpfButton   uIAcceptButton           = this.UIUser1_NewTasksWindow.UIAcceptButton;
            WinButton   uIOKButton               = this.UIOKWindow.UIOKButton;
            WpfEdit     uIProductListTextBoxEdit = this.UIExcelDialogWindow.UIProductListTextBoxEdit;
            WpfButton   uIOKButton1              = this.UIExcelDialogWindow.UIOKButton;
            WinButton   uICloseButton            = this.UIUser1_NewTasksWindow1.UICloseButton;
            #endregion

            // Click 'Debug' title bar
            Mouse.Click(uIDebugTitleBar, new Point(545, 18));

            // Double-Click 'Name' text box
            Mouse.DoubleClick(uINameEdit, new Point(73, 20));

            // Type 'user1' in 'LoginBox' text box
            uILoginBoxEdit.Text = this.SendMail2Params.UILoginBoxEditText;

            // Type '{Tab}' in 'LoginBox' text box
            Keyboard.SendKeys(uILoginBoxEdit, this.SendMail2Params.UILoginBoxEditSendKeys, ModifierKeys.None);

            // Type '********' in 'PasswordBox' text box
            Keyboard.SendKeys(uIPasswordBoxEdit, this.SendMail2Params.UIPasswordBoxEditSendKeys, true);

            // Click 'Sign in' button
            Mouse.Click(uISigninButton, new Point(12, 34));

            // Click 'Fetch offers' button
            Mouse.Click(uIFetchoffersButton, new Point(102, 43));

            // Click 'mailSubject8832' cell
            Mouse.Click(uIMailSubject8832Cell, new Point(64, 10));

            // Select 'Employee #2' check box
            uIEmployee2CheckBox.Checked = this.SendMail2Params.UIEmployee2CheckBoxChecked;

            // Click 'Accept' button
            Mouse.Click(uIAcceptButton, new Point(63, 54));

            // Click 'OK' button
            Mouse.Click(uIOKButton, new Point(44, 6));

            // Type '1,2' in 'productListTextBox' text box
            uIProductListTextBoxEdit.Text = this.SendMail2Params.UIProductListTextBoxEditText;

            // Click 'OK' button
            Mouse.Click(uIOKButton1, new Point(88, 15));

            // Click 'Close' button
            Mouse.Click(uICloseButton, new Point(21, 19));
        }
        /// <summary>
        /// RecordedMethod1 - Use 'RecordedMethod1Params' to pass parameters into this method.
        /// </summary>
        public void RecordedMethod1()
        {
            #region Variable Declarations
            WinClient grid = this.wBreakfieldtextsubstitution.wTextSubstitution_FPGrid.grid;
            WinEdit   txt  = this.wBreakfieldtextsubstitution.wCommon_txt.txt;
            WinButton btn  = this.wBreakfieldtextsubstitution.wOK.btn;
            #endregion

            // Double-Click 'Break field' client
            Mouse.DoubleClick(grid, new Point(94, 28));

            // Type 'a' in text box
            txt.Text = this.RecordedMethod1Params.txtText;

            // Double-Click 'Break field' client
            Mouse.DoubleClick(grid, new Point(228, 31));

            // Type 'b' in text box
            txt.Text = this.RecordedMethod1Params.txtText1;

            // Type '{Tab}' in text box
            Keyboard.SendKeys(txt, this.RecordedMethod1Params.txtSendKeys, ModifierKeys.None);

            // Type '{PageUp}{End}{Home}' in 'Break field' client
            Keyboard.SendKeys(grid, this.RecordedMethod1Params.gridSendKeys, ModifierKeys.None);

            // Click 'OK' button
            Mouse.Click(btn, new Point(17, 3));
        }
        /// <summary>
        /// ECS_login_RecordedMethod1 - Use 'ECS_login_RecordedMethod1Params' to pass parameters into this method.
        /// </summary>
        public void ECS_login_RecordedMethod1()
        {
            #region Variable Declarations
            HtmlEdit        uIUserNameEdit = this.UIECSPortalSacramentoSWindow.UIECSPortalSacramentoSDocument1.UIUserNameEdit;
            HtmlEdit        uIPasswordEdit = this.UIECSPortalSacramentoSWindow.UIECSPortalSacramentoSDocument1.UIPasswordEdit;
            HtmlInputButton uILoginButton  = this.UIECSPortalSacramentoSWindow.UIECSPortalSacramentoSDocument1.UILoginButton;
            #endregion

            // Last mouse action was not recorded.

            // Type 'palaniss' in 'User Name :' text box
            uIUserNameEdit.Text = this.ECS_login_RecordedMethod1Params.UIUserNameEditText;

            // Type '{Tab}' in 'User Name :' text box
            Keyboard.SendKeys(uIUserNameEdit, this.ECS_login_RecordedMethod1Params.UIUserNameEditSendKeys, ModifierKeys.None);

            // Type '********' in 'Password :'******'{Tab}' in 'Password :'******'{Enter}' in 'Login >>' button
            Keyboard.SendKeys(uILoginButton, this.ECS_login_RecordedMethod1Params.UILoginButtonSendKeys, ModifierKeys.None);
        }
예제 #5
0
        /// <summary>
        /// RecordedMethod2 - Use 'RecordedMethod2Params' to pass parameters into this method.
        /// </summary>
        public void RecordedMethod2()
        {
            #region Variable Declarations
            WinEdit   uINameEdit          = this.UIDebugWindow.UIItemWindow.UIDigital_docs_wpfListItem.UINameEdit;
            WpfEdit   uILoginBoxEdit      = this.UILoginViewWindow.UILoginBoxEdit;
            WpfEdit   uIPasswordBoxEdit   = this.UILoginViewWindow.UIPasswordBoxEdit;
            WpfButton uISigninButton      = this.UILoginViewWindow.UISigninButton;
            WpfButton uIBacktologinButton = this.UIUser1_NewTasksWindow.UIBacktologinButton;
            WinButton uICloseButton       = this.UILoginViewWindow1.UICloseButton;
            #endregion

            // Double-Click 'Name' text box
            Mouse.DoubleClick(uINameEdit, new Point(82, 23));

            // Type 'user1' in 'LoginBox' text box
            uILoginBoxEdit.Text = this.RecordedMethod2Params.UILoginBoxEditText;

            // Type '{Tab}' in 'LoginBox' text box
            Keyboard.SendKeys(uILoginBoxEdit, this.RecordedMethod2Params.UILoginBoxEditSendKeys, ModifierKeys.None);

            // Type '********' in 'PasswordBox' text box
            Keyboard.SendKeys(uIPasswordBoxEdit, this.RecordedMethod2Params.UIPasswordBoxEditSendKeys, true);

            // Click 'Sign in' button
            Mouse.Click(uISigninButton, new Point(35, 8));

            // Click 'Back to login' button
            Mouse.Click(uIBacktologinButton, new Point(59, 51));

            // Click 'Close' button
            Mouse.Click(uICloseButton, new Point(38, 23));
        }
예제 #6
0
        /// <summary>
        /// Sonuc
        /// </summary>
        public void islemSonuc()
        {
            #region Variable Declarations
            WinWindow   uITxtSayi1Window   = this.UIForm1Window.UIForm1Client.UITxtSayi1Window;
            WinWindow   uITxtSayi2Window   = this.UIForm1Window.UIForm1Client.UITxtSayi2Window;
            WinEdit     uITxtSayi2Edit     = this.UIForm1Window.UITxtSayi2Window.UITxtSayi2Edit;
            WinComboBox uISayi2ComboBox    = this.UIForm1Window.UIComboBox1Window.UISayi2ComboBox;
            WinButton   uITıklayınızButton = this.UIForm1Window.UITıklayınızWindow.UITıklayınızButton;
            WinButton   uIHesaplaButton    = this.UIForm1Window.UIHesaplaWindow.UIHesaplaButton;
            #endregion

            // Click 'txtSayi1' window
            Mouse.Click(uITxtSayi1Window, new Point(64, 66));

            // Click 'txtSayi2' window
            Mouse.Click(uITxtSayi2Window, new Point(63, 77));

            // Type '{Tab}' in 'txtSayi2' text box
            Keyboard.SendKeys(uITxtSayi2Edit, this.islemSonucParams.UITxtSayi2EditSendKeys, ModifierKeys.None);

            // Select 'Topla' in 'Sayi2' combo box
            uISayi2ComboBox.SelectedItem = this.islemSonucParams.UISayi2ComboBoxSelectedItem;

            // Type '{Tab}' in 'Sayi2' combo box
            Keyboard.SendKeys(uISayi2ComboBox, this.islemSonucParams.UISayi2ComboBoxSendKeys, ModifierKeys.None);

            // Type '{Tab}' in 'Tıklayınız' button
            Keyboard.SendKeys(uITıklayınızButton, this.islemSonucParams.UITıklayınızButtonSendKeys, ModifierKeys.None);

            // Type '{Enter}' in 'Hesapla' button
            Keyboard.SendKeys(uIHesaplaButton, this.islemSonucParams.UIHesaplaButtonSendKeys, ModifierKeys.None);
        }
예제 #7
0
        public void US7_AnmodningAfBiludleje_GodkendelseAfLejeAfBil()
        {
            // Arrange
            this.UIMap.ClickLoginEmailBox();
            Keyboard.SendKeys("car@renter");
            this.UIMap.ClickLoginPasswordBox();
            Keyboard.SendKeys("123asd");
            this.UIMap.ClickLoginButton();
            Thread.Sleep(1000);
            this.UIMap.ClickFindCarButton();
            Thread.Sleep(2000);
            this.UIMap.ClickSearchRentCar2();
            this.UIMap.SetSendRequestFromDate();
            Keyboard.SendKeys(fromDate);
            this.UIMap.SetSendRequestToDate();
            Keyboard.SendKeys(toDate);
            Thread.Sleep(1000);
            this.UIMap.ClickSendRequestMessage();
            Keyboard.SendKeys("I would love to rent your car!");
            this.UIMap.ClickSendRequestRentCarButton();
            Thread.Sleep(1000);
            this.UIMap.ClickSignOutButton();
            Thread.Sleep(3000);

            // Act
            this.UIMap.ClickLoginEmailBox();
            Keyboard.SendKeys("car@owner");
            this.UIMap.ClickLoginPasswordBox();
            Keyboard.SendKeys("123asd");
            this.UIMap.ClickLoginButton();
            Thread.Sleep(1000);
            this.UIMap.ClickTopNotification();

            Thread.Sleep(1000);
        }
예제 #8
0
        public void testmethods()
        {
            ApplicationUnderTest note = ApplicationUnderTest.Launch("C:\\Windows\\System32\\notepad.exe");
            UITestControl        num  = new UITestControl();

            num.TechnologyName = "MSAA";
            num.SearchProperties[UITestControl.PropertyNames.Name] = "Untitled - Notepad";
            UITestControl           but     = new WinButton(num);
            UITestControlCollection control = but.FindMatchingControls();
            var controlbutton = control.GetNamesOfControls();

            foreach (var c in controlbutton)
            {
                Keyboard.SendKeys(c + "\n");
            }


            // var Ocr = new AutoOcr();
            //var Result = Ocr.Read(@"C:\Users\shravya.shastri\Desktop\qrcode.png");
            // Console.WriteLine(Result.Text);
            // string n = Result.ToString();
            // method.launch();
            // Keyboard.SendKeys(n);
            // method.filemethod();
            // method.savemethod();
            // method.scenarios();
            //mouse.rightclickmethod();
        }
        /// <summary>
        /// test2
        /// </summary>
        public void RecordedMethod2()
        {
            #region Variable Declarations
            WinControl uIToDoRailsandAngularGDocument = this.UIToDoRailsandAngularGWindow.UIToDoRailsandAngularGDocument;
            #endregion

            // Click 'ToDo Rails and Angular - Google Chrome' document
            Mouse.Click(uIToDoRailsandAngularGDocument, new Point(573, 153));

            // Type 'test 3' in 'ToDo Rails and Angular - Google Chrome' document
            Keyboard.SendKeys(uIToDoRailsandAngularGDocument, this.RecordedMethod2Params.UIToDoRailsandAngularGDocumentSendKeys, ModifierKeys.None);

            // Click 'ToDo Rails and Angular - Google Chrome' document
            Mouse.Click(uIToDoRailsandAngularGDocument, new Point(1322, 166));

            // Click 'ToDo Rails and Angular - Google Chrome' document
            Mouse.Click(uIToDoRailsandAngularGDocument, new Point(1112, 315));

            // Click 'ToDo Rails and Angular - Google Chrome' document
            Mouse.Click(uIToDoRailsandAngularGDocument, new Point(651, 310));

            // Type 'subtest 3' in 'ToDo Rails and Angular - Google Chrome' document
            Keyboard.SendKeys(uIToDoRailsandAngularGDocument, this.RecordedMethod2Params.UIToDoRailsandAngularGDocumentSendKeys1, ModifierKeys.None);

            // Click 'ToDo Rails and Angular - Google Chrome' document
            Mouse.Click(uIToDoRailsandAngularGDocument, new Point(546, 428));

            // Click 'ToDo Rails and Angular - Google Chrome' document
            Mouse.Click(uIToDoRailsandAngularGDocument, new Point(1048, 660));
        }
        /// <summary>
        /// Insert double into cell
        /// </summary>
        public void RecordedMethod1()
        {
            #region Variable Declarations
            WinListItem uIRecycleBinListItem     = this.UIItemWindow.UIFolderViewWindow.UIRecycleBinListItem;
            WinListItem uIMozillaFirefoxListItem = this.UIItemWindow.UIFolderViewWindow.UIMozillaFirefoxListItem;
            WinEdit     uICellContentsValueEdit  = this.UISpreadsheetWindow.UICellContentsValueWindow.UICellContentsValueEdit;
            #endregion

            // Launch '%windir%\SysWOW64\WerFault.exe' with arguments '-u -p 1560 -s 592'
            ApplicationUnderTest werFaultApplication = ApplicationUnderTest.Launch(this.RecordedMethod1Params.ExePath, this.RecordedMethod1Params.AlternateExePath, "-u -p 1560 -s 592");

            // Launch '%USERPROFILE%\Source\Repos\cs3500\Spreadsheet\SpreadsheetGUI\bin\Debug\SpreadsheetGUI.exe'
            ApplicationUnderTest uISpreadsheetWindow = ApplicationUnderTest.Launch(this.RecordedMethod1Params.UISpreadsheetWindowExePath, this.RecordedMethod1Params.UISpreadsheetWindowAlternateExePath);

            // Click 'Recycle Bin' list item
            Mouse.Click(uIRecycleBinListItem, new Point(110, 115));

            // Click 'Recycle Bin' list item
            Mouse.Click(uIRecycleBinListItem, new Point(110, 115));

            // Click 'Mozilla Firefox' list item
            Mouse.Click(uIMozillaFirefoxListItem, new Point(143, 45));

            // Type '5' in 'cellContentsValue' text box
            uICellContentsValueEdit.Text = this.RecordedMethod1Params.UICellContentsValueEditText;

            // Type '{Enter}' in 'cellContentsValue' text box
            Keyboard.SendKeys(uICellContentsValueEdit, this.RecordedMethod1Params.UICellContentsValueEditSendKeys, ModifierKeys.None);
        }
예제 #11
0
        /// <summary>
        /// RecordedMethod1 - Use 'RecordedMethod1Params' to pass parameters into this method.
        /// </summary>
        public void RecordedMethod1()
        {
            #region Variable Declarations
            WinButton       uISearchthewebandWindoButton = this.UISearchthewebandWindoWindow.UISearchthewebandWindoButton;
            BrowserWindow   uINewtabInternetExplorWindow = this.UINewtabInternetExplorWindow;
            HtmlEdit        uIInputNumberEdit            = this.UINewtabInternetExplorWindow.UIHomePageMyASPNETApplDocument.UIInputNumberEdit;
            HtmlInputButton uISubmitButton = this.UINewtabInternetExplorWindow.UIHomePageMyASPNETApplDocument.UISubmitButton;
            #endregion

            // Click 'Search the web and Windows' button
            Mouse.Click(uISearchthewebandWindoButton, new Point(152, 4));

            // To test Windows Store apps, use the Coded UI Test project template for Windows Store apps under the Windows Store node.

            // To test Windows Store apps, use the Coded UI Test project template for Windows Store apps under the Windows Store node.

            // To test Windows Store apps, use the Coded UI Test project template for Windows Store apps under the Windows Store node.

            // To test Windows Store apps, use the Coded UI Test project template for Windows Store apps under the Windows Store node.

            // Go to web page 'http://localhost/test/'
            uINewtabInternetExplorWindow.NavigateToUrl(new System.Uri(this.RecordedMethod1Params.UINewtabInternetExplorWindowUrl));

            // Type '20' in 'Input Number' text box
            uIInputNumberEdit.Text = this.RecordedMethod1Params.UIInputNumberEditText;

            // Type '{Enter}' in 'Input Number' text box
            Keyboard.SendKeys(uIInputNumberEdit, this.RecordedMethod1Params.UIInputNumberEditSendKeys, ModifierKeys.None);

            // Type '20' in 'Input Number' text box
            uIInputNumberEdit.Text = this.RecordedMethod1Params.UIInputNumberEditText1;

            // Click 'Submit' button
            Mouse.Click(uISubmitButton, new Point(32, 27));
        }
예제 #12
0
        /// <summary>
        /// browserAction_method - Use 'browserAction_methodParams' to pass parameters into this method.
        /// </summary>
        public void browserAction_method()
        {
            #region Variable Declarations
            WinClient   uINewtabInternetExplorClient = this.UINewtabInternetExplorWindow.UIItemWindow.UINewtabInternetExplorClient;
            WinMenuItem uIToolsMenuItem = this.UINewtabInternetExplorWindow.UIApplicationMenuBar.UIToolsMenuItem;
            WinMenuItem uIDeletebrowsinghistorMenuItem = this.UIItemWindow.UIContextMenu.UIDeletebrowsinghistorMenuItem;
            WinButton   uIDeleteButton = this.UIDeleteBrowsingHistorWindow.UIDeleteWindow.UIDeleteButton;
            #endregion

            // Type '{F10}' in 'New tab - Internet Explorer' client
            Keyboard.SendKeys(uINewtabInternetExplorClient, this.browserAction_methodParams.UINewtabInternetExplorClientSendKeys, ModifierKeys.None);

            // Click 'Tools' menu item
            //Mouse.Click(uIToolsMenuItem);
            Mouse.Click(uIToolsMenuItem, new Point(24, 14));

            // Click 'Delete browsing history... Ctrl+Shift+Del' menu item
            // Mouse.Click(uIDeletebrowsinghistorMenuItem);
            Mouse.Click(uIDeletebrowsinghistorMenuItem, new Point(23, 14));
            Playback.Wait(50);

            try
            {
                Keyboard.SendKeys("{LEFT}");
                Keyboard.SendKeys("{ENTER}");

                WriteLogs("PASS : Cleared the Local Stoarge Data : VERIFICATION");
            }
            catch (Exception ex)
            {
                WriteLogs("FAIL : Not cleared the Local Storage Data : VERIFICATION");
                WriteLogs("---------" + ex.Message.ToString());
            }
        }
예제 #13
0
        /// <summary>
        /// test that the Arrow keys are not cuasing any problems
        ///in literal corner cases
        /// </summary>
        public void CornersTest()
        {
            #region Variable Declarations
            WinEdit   uITextBox_contentEdit     = this.UIYexcelWindow.UITextBox_contentWindow.UITextBox_contentEdit;
            WinClient uISpreadsheetPanel1Client = this.UIYexcelWindow.UIItemWindow.UISpreadsheetPanel1Client;
            #endregion

            // Type '' in 'textBox_content' text box
            uITextBox_contentEdit.Text = this.CornersTestParams.UITextBox_contentEditText;

            // Type '{Up}' in 'textBox_content' text box
            Keyboard.SendKeys(uITextBox_contentEdit, this.CornersTestParams.UITextBox_contentEditSendKeys, ModifierKeys.None);

            // Click 'spreadsheetPanel1' client
            Mouse.Click(uISpreadsheetPanel1Client, new Point(1023, 42));

            // Type '{Up}{Right}{Down}{Right}{Up}{Up}{Left}{Up}{Right}{Down}' in 'textBox_content' text box
            Keyboard.SendKeys(uITextBox_contentEdit, this.CornersTestParams.UITextBox_contentEditSendKeys1, ModifierKeys.None);

            // Click 'spreadsheetPanel1' client
            Mouse.Click(uISpreadsheetPanel1Client, new Point(1133, 660));

            // Type '{Right}{Down}{Down}{Left}{Down}{Down}' in 'textBox_content' text box
            Keyboard.SendKeys(uITextBox_contentEdit, this.CornersTestParams.UITextBox_contentEditSendKeys2, ModifierKeys.None);

            // Click 'spreadsheetPanel1' client
            Mouse.Click(uISpreadsheetPanel1Client, new Point(160, 680));

            // Type '{Down}{Left}{Down}{Up}{Left}' in 'textBox_content' text box
            Keyboard.SendKeys(uITextBox_contentEdit, this.CornersTestParams.UITextBox_contentEditSendKeys3, ModifierKeys.None);
        }
예제 #14
0
        /// <summary>
        /// CloseBranch
        /// </summary>
        public void CloseBranch()
        {
            #region Variable Declarations
            WinButton uICloseBranchButton = this.UICommercialDepositDesWindow.UICloseBranchWindow.UICloseBranchButton;
            WinButton uICloseButton       = this.UIMissingDeferredDeposWindow.UICloseWindow.UICloseButton;
            #endregion


            System.Threading.Thread.Sleep(2000);
            // Click '&Close Branch' button
            Mouse.Click(uICloseBranchButton, new Point(51, 13));
            System.Threading.Thread.Sleep(500);


            try
            {
                Keyboard.SendKeys(uICloseButton, "{Escape}", ModifierKeys.None);
            }
            catch (Exception)
            {
            }

            // Click '&Close' button


            //try
            //{
            //    Mouse.Click(uICloseButton, new Point(17, 9));
            //}
            //catch (Exception)
            //{


            //}
        }
예제 #15
0
        /// <summary>
        /// CheckAddition - Use 'CheckAdditionParams' to pass parameters into this method.
        /// </summary>
        public void CheckAddition()
        {
            #region Variable Declarations
            WpfEdit     uITextBoxEdit       = this.UIMainWindowWindow.UITextBoxEdit;
            WpfEdit     uITextBox_CopyEdit  = this.UIMainWindowWindow.UITextBox_CopyEdit;
            WpfComboBox uIComboBoxComboBox  = this.UIMainWindowWindow.UIComboBoxComboBox;
            WpfEdit     uITextBox_Copy1Edit = this.UIMainWindowWindow.UITextBox_Copy1Edit;
            WpfButton   uICalculateButton   = this.UIMainWindowWindow.UICalculateButton;
            #endregion

            // Type '2' in 'textBox' text box
            uITextBoxEdit.Text = this.CheckAdditionParams.UITextBoxEditText;

            // Type '{Tab}' in 'textBox' text box
            Keyboard.SendKeys(uITextBoxEdit, this.CheckAdditionParams.UITextBoxEditSendKeys, ModifierKeys.None);

            // Type '1' in 'textBox_Copy' text box
            uITextBox_CopyEdit.Text = this.CheckAdditionParams.UITextBox_CopyEditText;

            // Type '{Tab}' in 'textBox_Copy' text box
            Keyboard.SendKeys(uITextBox_CopyEdit, this.CheckAdditionParams.UITextBox_CopyEditSendKeys, ModifierKeys.None);

            // Select 'Add' in 'comboBox' combo box
            uIComboBoxComboBox.SelectedItem = this.CheckAdditionParams.UIComboBoxComboBoxSelectedItem;

            // Click 'textBox_Copy1' text box
            Mouse.Click(uITextBox_Copy1Edit, new Point(101, 17));

            // Click 'Calculate' button
            Mouse.Click(uICalculateButton, new Point(72, 17));
        }
예제 #16
0
        /// <summary>
        /// Master-Detail
        /// </summary>
        public void StudentsRecordMethod()
        {
            #region Variable Declarations
            WinComboBox uIOpenComboBox            = this.UIRunWindow.UIItemWindow.UIOpenComboBox;
            WinEdit     uIOpenEdit                = this.UIRunWindow.UIItemWindow1.UIOpenEdit;
            WinEdit     uIAddressandsearchbarEdit = this.UINewTabGoogleChromeWindow.UIItemGroup.UIAddressandsearchbarEdit;
            #endregion

            // Press keyboard shortcut keys 'Windows + r'
            Keyboard.SendKeys(this.StudentsRecordMethodParams.SendKeys, ModifierKeys.Windows);

            // Select 'chrome.exe' in 'Open:' combo box
            uIOpenComboBox.EditableItem = this.StudentsRecordMethodParams.UIOpenComboBoxEditableItem;

            // Type '{Enter}' in 'Open:' text box
            Keyboard.SendKeys(uIOpenEdit, this.StudentsRecordMethodParams.UIOpenEditSendKeys, ModifierKeys.None);

            // Type 'localhost{RShiftKey}:26118{Enter}' in 'Address and search bar' text box
            Keyboard.SendKeys(uIAddressandsearchbarEdit, this.StudentsRecordMethodParams.UIAddressandsearchbarEditSendKeys, ModifierKeys.None);

            // Last mouse action was not recorded.

            // Last mouse action was not recorded.

            // Last mouse action was not recorded.
        }
        public void CodedUITestMethod1()
        {
            // Arrange
            var path = @"C:\Kurse\Testing\2017_08_22_SoftwareTests_Burghausen\HalloWPF\bin\Debug\HalloWPF.exe";
            var app  = ApplicationUnderTest.Launch(path);

            var mainWindow = new WpfWindow(app);

            mainWindow.SearchProperties.Add(WpfWindow.PropertyNames.Name, "halloWPFWindow");

            var inputTextBox = new WpfEdit(mainWindow);

            inputTextBox.SearchProperties.Add(WpfEdit.PropertyNames.AutomationId, "inputTextBox");

            var outputTextBlock = new WpfText(mainWindow);

            outputTextBlock.SearchProperties.Add(WpfText.PropertyNames.AutomationId, "outputTextBlock");

            var inputButton = new WpfButton(mainWindow);

            inputButton.SearchProperties.Add(WpfButton.PropertyNames.AutomationId, "inputButton");

            var outputCheckBox = new WpfCheckBox(mainWindow);

            outputCheckBox.SearchProperties.Add(WpfCheckBox.PropertyNames.AutomationId, "outputCheckBox");

            // Act
            Keyboard.SendKeysDelay = 500;
            Keyboard.SendKeys(inputTextBox, "Hallo WPF from coded UI Test.");
            Mouse.Click(inputButton);

            // Assert
            Assert.AreEqual("Hallo WPF from coded UI Test.", outputTextBlock.DisplayText);
            Assert.IsTrue(outputCheckBox.Checked);
        }
        /// <summary>
        /// login success
        /// </summary>
        public void RecordedMethod1()
        {
            #region Variable Declarations
            WinControl uIChromeLegacyWindowDocument  = this.UIGradePerformanceAnalWindow.UIChromeLegacyWindowWindow1.UIChromeLegacyWindowDocument;
            WinControl uIChromeLegacyWindowDocument1 = this.UIGradePerformanceAnalWindow.UIChromeLegacyWindowWindow1.UIChromeLegacyWindowDocument1;
            WinControl uIChromeLegacyWindowDocument2 = this.UIGradePerformanceAnalWindow.UIChromeLegacyWindowWindow1.UIChromeLegacyWindowDocument2;
            WinControl uIChromeLegacyWindowDocument3 = this.UIGradePerformanceAnalWindow.UIChromeLegacyWindowWindow1.UIChromeLegacyWindowDocument3;
            WinControl uIChromeLegacyWindowDocument4 = this.UIGradePerformanceAnalWindow.UIChromeLegacyWindowWindow1.UIChromeLegacyWindowDocument4;
            WinButton  uIItemButton = this.UIItemWindow.UIItemComboBox.UIItemButton;
            #endregion

            // Click 'Chrome Legacy Window' document
            Mouse.Click(uIChromeLegacyWindowDocument, new Point(524, 243));

            // Type 'admin' in 'Chrome Legacy Window' document
            Keyboard.SendKeys(uIChromeLegacyWindowDocument1, this.RecordedMethod1Params.UIChromeLegacyWindowDocument1SendKeys, ModifierKeys.None);

            // Click 'Chrome Legacy Window' document
            Mouse.Click(uIChromeLegacyWindowDocument2, new Point(714, 354));

            // Type 'admin' in 'Chrome Legacy Window' document
            Keyboard.SendKeys(uIChromeLegacyWindowDocument3, this.RecordedMethod1Params.UIChromeLegacyWindowDocument3SendKeys, ModifierKeys.None);

            // Click 'Chrome Legacy Window' document
            Mouse.Click(uIChromeLegacyWindowDocument4, new Point(744, 424));

            // Click button
            Mouse.Click(uIItemButton, new Point(20, 19));
        }
예제 #19
0
        /// <summary>
        /// NewDeposit - Use 'NewDepositParams' to pass parameters into this method.
        /// </summary>
        public void NewDeposit()
        {
            #region Variable Declarations
            WinButton uINewDepositButton  = this.UICommercialDepositDesWindow.UINewDepositWindow.UINewDepositButton;
            WinEdit   uIItemEdit          = this.UINewDepositWindow.UIItemWindow.UIItemEdit;
            WinEdit   uIItemEdit1         = this.UINewDepositWindow.UIItemWindow1.UIItemEdit;
            WinEdit   uIItemEdit2         = this.UINewDepositWindow.UIItemWindow2.UIItemEdit;
            WinButton uISaveDepositButton = this.UINewDepositWindow.UISaveDepositWindow.UISaveDepositButton;
            #endregion

            System.Threading.Thread.Sleep(500);
            // Click 'Ne&w Deposit' button
            Mouse.Click(uINewDepositButton, new Point(63, 18));
            System.Threading.Thread.Sleep(500);
            // Type '101' in 'Unknown Name' text box
            uIItemEdit.Text = this.NewDepositParams.UIItemEditText;
            System.Threading.Thread.Sleep(500);
            // Type '100' in 'Unknown Name' text box
            uIItemEdit1.Text = this.NewDepositParams.UIItemEditText1;
            System.Threading.Thread.Sleep(500);
            // Type '{Tab}' in 'Unknown Name' text box
            Keyboard.SendKeys(uIItemEdit1, this.NewDepositParams.UIItemEditSendKeys, ModifierKeys.None);
            System.Threading.Thread.Sleep(500);
            // Type '1111' in 'Unknown Name' text box
            uIItemEdit2.Text = this.NewDepositParams.UIItemEditText2;
            System.Threading.Thread.Sleep(500);
            // Click '&Save Deposit' button
            Mouse.Click(uISaveDepositButton, new Point(42, 6));
        }
        /// <summary>
        /// Success scenario
        /// </summary>
        public void adminLogin()
        {
            #region Variable Declarations
            WinClient  uIChromeLegacyWindowClient     = this.UIGradePerformanceAnalWindow.UIChromeLegacyWindowWindow.UIChromeLegacyWindowClient;
            WinControl uIGradePerformanceAnalDocument = this.UIGradePerformanceAnalWindow.UIChromeLegacyWindowWindow.UIGradePerformanceAnalDocument;
            WinControl uIChromeLegacyWindowDocument   = this.UIGradePerformanceAnalWindow.UIChromeLegacyWindowWindow.UIChromeLegacyWindowDocument;
            WinButton  uIItemButton = this.UIItemWindow.UIItemComboBox.UIItemButton;
            #endregion

            // Click 'Chrome Legacy Window' client
            Mouse.Click(uIChromeLegacyWindowClient, new Point(682, 250));

            // Type 'a' in 'Grade Performance Analyzer - Google Chrome' document
            Keyboard.SendKeys(uIGradePerformanceAnalDocument, this.adminLoginParams.UIGradePerformanceAnalDocumentSendKeys, ModifierKeys.None);

            // Type 'dmin' in 'Chrome Legacy Window' document
            Keyboard.SendKeys(uIChromeLegacyWindowDocument, this.adminLoginParams.UIChromeLegacyWindowDocumentSendKeys, ModifierKeys.None);

            // Click 'Chrome Legacy Window' document
            Mouse.Click(uIChromeLegacyWindowDocument, new Point(646, 353));

            // Type 'admin' in 'Chrome Legacy Window' document
            Keyboard.SendKeys(uIChromeLegacyWindowDocument, this.adminLoginParams.UIChromeLegacyWindowDocumentSendKeys1, ModifierKeys.None);

            // Click 'Chrome Legacy Window' document
            Mouse.Click(uIChromeLegacyWindowDocument, new Point(774, 431));

            // Click button
            Mouse.Click(uIItemButton, new Point(26, 17));
        }
예제 #21
0
        /// <summary>
        /// RecordedMethod1 - 'RecordedMethod1Params'을(를) 사용하여 매개 변수를 이 메서드로 전달합니다.
        /// </summary>
        public void RecordedMethod1()
        {
            #region Variable Declarations
            WinComboBox uI열기OComboBox = this.UI실행Window.UIItemWindow.UI열기OComboBox;
            WinEdit     uI열기OEdit     = this.UI실행Window.UIItemWindow1.UI열기OEdit;
            #endregion

            // 'Windows + d' 바로 가기 키 누르기
            Keyboard.SendKeys(this.RecordedMethod1Params.SendKeys, ModifierKeys.Windows);

            // 'Windows + r' 바로 가기 키 누르기
            Keyboard.SendKeys(this.RecordedMethod1Params.SendKeys1, ModifierKeys.Windows);

            // '열기(O):' 콤보 상자에서 'http://localhost:8126/' 선택
            uI열기OComboBox.EditableItem = this.RecordedMethod1Params.UI열기OComboBoxEditableItem;

            // '열기(O):' 입력란에 '{Enter}' 입력
            Keyboard.SendKeys(uI열기OEdit, this.RecordedMethod1Params.UI열기OEditSendKeys, ModifierKeys.None);

            // Windows 스토어 응용 프로그램을 테스트하려면 Windows 스토어 노드 아래에서 Windows 스토어 응용 프로그램에 대한 코딩된 UI 테스트 프로젝트 템플릿을 사용하십시오.

            // Windows 스토어 응용 프로그램을 테스트하려면 Windows 스토어 노드 아래에서 Windows 스토어 응용 프로그램에 대한 코딩된 UI 테스트 프로젝트 템플릿을 사용하십시오.

            // Windows 스토어 응용 프로그램을 테스트하려면 Windows 스토어 노드 아래에서 Windows 스토어 응용 프로그램에 대한 코딩된 UI 테스트 프로젝트 템플릿을 사용하십시오.

            // Windows 스토어 응용 프로그램을 테스트하려면 Windows 스토어 노드 아래에서 Windows 스토어 응용 프로그램에 대한 코딩된 UI 테스트 프로젝트 템플릿을 사용하십시오.

            // Windows 스토어 응용 프로그램을 테스트하려면 Windows 스토어 노드 아래에서 Windows 스토어 응용 프로그램에 대한 코딩된 UI 테스트 프로젝트 템플릿을 사용하십시오.

            // Windows 스토어 응용 프로그램을 테스트하려면 Windows 스토어 노드 아래에서 Windows 스토어 응용 프로그램에 대한 코딩된 UI 테스트 프로젝트 템플릿을 사용하십시오.
        }
        /// <summary>
        /// unsuccessful scenario
        /// </summary>
        public void adminLogin2()
        {
            #region Variable Declarations
            WinClient  uIChromeLegacyWindowClient     = this.UIGradePerformanceAnalWindow.UIChromeLegacyWindowWindow1.UIChromeLegacyWindowClient;
            WinClient  uIChromeLegacyWindowClient1    = this.UIGradePerformanceAnalWindow.UIChromeLegacyWindowWindow2.UIChromeLegacyWindowClient;
            WinControl uIGradePerformanceAnalDocument = this.UIGradePerformanceAnalWindow.UIChromeLegacyWindowWindow3.UIGradePerformanceAnalDocument;
            WinControl uIChromeLegacyWindowDocument   = this.UIGradePerformanceAnalWindow.UIChromeLegacyWindowWindow4.UIChromeLegacyWindowDocument;
            WinControl uIChromeLegacyWindowDocument1  = this.UIGradePerformanceAnalWindow.UIChromeLegacyWindowWindow5.UIChromeLegacyWindowDocument;
            WinControl uIChromeLegacyWindowDocument2  = this.UIGradePerformanceAnalWindow.UIChromeLegacyWindowWindow6.UIChromeLegacyWindowDocument;
            WinControl uIChromeLegacyWindowDocument3  = this.UIGradePerformanceAnalWindow.UIChromeLegacyWindowWindow7.UIChromeLegacyWindowDocument;
            #endregion

            // Click 'Chrome Legacy Window' client
            Mouse.Click(uIChromeLegacyWindowClient, new Point(499, 234));

            // Move 'Chrome Legacy Window' client
            Mouse.StartDragging(uIChromeLegacyWindowClient1, new Point(504, 242));
            Mouse.StopDragging(uIChromeLegacyWindowClient1, -5, 0);

            // Type 'a' in 'Grade Performance Analyzer - Google Chrome' document
            Keyboard.SendKeys(uIGradePerformanceAnalDocument, this.adminLogin2Params.UIGradePerformanceAnalDocumentSendKeys, ModifierKeys.None);

            // Type 'dmin' in 'Chrome Legacy Window' document
            Keyboard.SendKeys(uIChromeLegacyWindowDocument, this.adminLogin2Params.UIChromeLegacyWindowDocumentSendKeys, ModifierKeys.None);

            // Click 'Chrome Legacy Window' document
            Mouse.Click(uIChromeLegacyWindowDocument1, new Point(497, 345));

            // Type 'ad' in 'Chrome Legacy Window' document
            Keyboard.SendKeys(uIChromeLegacyWindowDocument2, this.adminLogin2Params.UIChromeLegacyWindowDocumentSendKeys1, ModifierKeys.None);

            // Click 'Chrome Legacy Window' document
            Mouse.Click(uIChromeLegacyWindowDocument3, new Point(790, 432));
        }
예제 #23
0
        /// <summary>
        /// Cut the selected Text from the Screen
        /// </summary>
        public void CutAction()
        {
            #region Variable Declarations
            WinEdit     uIRTBEdit      = this.UITextEditorWindow.UIRTBWindow.UIRTBEdit;
            WinMenuItem uIEditMenuItem = this.UITextEditorWindow.UIMenuStrip1MenuBar.UIEditMenuItem;
            WinMenuItem uICutMenuItem  = this.UITextEditorWindow.UIMenuStrip1MenuBar.UIEditMenuItem.UICutMenuItem;
            #endregion

            // The recording for the application under test '\\obs-lancia\students\arya1516\TextEditor\TextEditor\bin\Debug\TextEditor.vshost.exe' may not be correct as it is located on a network share. Please install the application on a local path.

            // Type 'Hello ' in 'RTB' text box
            uIRTBEdit.Text = this.CutActionParams.UIRTBEditText;

            // Type '{LShiftKey}' in 'RTB' text box
            Keyboard.SendKeys(uIRTBEdit, this.CutActionParams.UIRTBEditSendKeys, ModifierKeys.None);

            // Click 'Edit' menu item
            Mouse.Click(uIEditMenuItem, new Point(8, 10));

            // Click 'RTB' text box
            Mouse.Click(uIRTBEdit, new Point(29, 4));

            // Move 'RTB' text box
            Mouse.StartDragging(uIRTBEdit, new Point(29, 11));
            Mouse.StopDragging(uIRTBEdit, -28, 3);

            // Click 'Edit' -> 'Cut' menu item
            Mouse.Click(uICutMenuItem, new Point(25, 6));
        }
예제 #24
0
        /// <summary>
        /// AddingNewCategory - Use 'AddingNewCategoryParams' to pass parameters into this method.
        /// </summary>
        public void AddingNewCategory()
        {
            #region Variable Declarations
            WinPane    uIListakategoriimojaapPane     = this.UIListakategoriimojaapWindow.UIListakategoriimojaapPane;
            WinPane    uIHomePagemojaaplikacjPane     = this.UIListakategoriimojaapWindow.UIHomePagemojaaplikacjPane;
            WinPane    uICreatemojaaplikacjapPane     = this.UIListakategoriimojaapWindow.UICreatemojaaplikacjapPane;
            WinControl uICreatemojaaplikacjapDocument = this.UIListakategoriimojaapWindow.UIChromeLegacyWindowWindow.UICreatemojaaplikacjapDocument;
            #endregion

            // Click 'Lista kategorii — moja aplikacja platformy ASP.NET...' pane
            Mouse.Click(uIListakategoriimojaapPane, new Point(416, 225));

            // Launch '%ProgramFiles(x86)%\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\PrivateAssemblies\ScriptedSandbox64.exe' with arguments '"Software\Microsoft\VisualStudio\15.0_5bd3f5c7\ScriptedPlugins" "Software\Microsoft\VisualStudio\15.0_5bd3f5c7_Config\ScriptedPlugins" 1098e 2f24 "C:/Program Files (x86)/Microsoft Visual Studio/2017/Enterprise/Common7/IDE/PrivateAssemblies/plugin.vs.js"'
            ApplicationUnderTest scriptedSandbox64Application = ApplicationUnderTest.Launch(this.AddingNewCategoryParams.ExePath, this.AddingNewCategoryParams.AlternateExePath, "\"Software\\Microsoft\\VisualStudio\\15.0_5bd3f5c7\\ScriptedPlugins\" \"Software\\Microso" +
                                                                                            "ft\\VisualStudio\\15.0_5bd3f5c7_Config\\ScriptedPlugins\" 1098e 2f24 \"C:/Program Fil" +
                                                                                            "es (x86)/Microsoft Visual Studio/2017/Enterprise/Common7/IDE/PrivateAssemblies/p" +
                                                                                            "lugin.vs.js\"");

            // Click 'Home Page — moja aplikacja platformy ASP.NET - Goo...' pane
            Mouse.Click(uIHomePagemojaaplikacjPane, new Point(816, 128));

            // Click 'Lista kategorii — moja aplikacja platformy ASP.NET...' pane
            Mouse.Click(uIListakategoriimojaapPane, new Point(439, 225));

            // Click 'Create — moja aplikacja platformy ASP.NET - Google...' pane
            Mouse.Click(uICreatemojaaplikacjapPane, new Point(670, 280));

            // Type 'Kategoria 8' in 'Create — moja aplikacja platformy ASP.NET - Google...' document
            Keyboard.SendKeys(uICreatemojaaplikacjapDocument, this.AddingNewCategoryParams.UICreatemojaaplikacjapDocumentSendKeys, ModifierKeys.None);

            // Click 'Create — moja aplikacja platformy ASP.NET - Google...' pane
            Mouse.Click(uICreatemojaaplikacjapPane, new Point(633, 343));
        }
예제 #25
0
        /// <summary>
        /// FetchUser2 - Use 'FetchUser2Params' to pass parameters into this method.
        /// </summary>
        public void FetchUser2()
        {
            #region Variable Declarations
            WinEdit   uINameEdit          = this.UIDebugWindow.UIItemWindow.UIDigital_docs_wpfListItem.UINameEdit;
            WpfEdit   uILoginBoxEdit      = this.UILoginViewWindow.UILoginBoxEdit;
            WpfEdit   uIPasswordBoxEdit   = this.UILoginViewWindow.UIPasswordBoxEdit;
            WpfButton uISigninButton      = this.UILoginViewWindow.UISigninButton;
            WpfButton uIFetchoffersButton = this.UIUser234_InProgressWindow.UIFetchoffersButton;
            WinButton uICloseButton       = this.UIUser234_InProgressWindow1.UICloseButton;
            #endregion

            // Double-Click 'Name' text box
            Mouse.DoubleClick(uINameEdit, new Point(52, 17));

            // Type 'user2' in 'LoginBox' text box
            uILoginBoxEdit.Text = this.FetchUser2Params.UILoginBoxEditText;

            // Type '{Tab}' in 'LoginBox' text box
            Keyboard.SendKeys(uILoginBoxEdit, this.FetchUser2Params.UILoginBoxEditSendKeys, ModifierKeys.None);

            // Type '********' in 'PasswordBox' text box
            Keyboard.SendKeys(uIPasswordBoxEdit, this.FetchUser2Params.UIPasswordBoxEditSendKeys, true);

            // Click 'Sign in' button
            Mouse.Click(uISigninButton, new Point(51, 29));

            // Click 'Fetch offers' button
            Mouse.Click(uIFetchoffersButton, new Point(36, 9));

            // Click 'Close' button
            Mouse.Click(uICloseButton, new Point(49, 18));
        }
예제 #26
0
        /// <summary>
        /// LettersInput - Используйте "LettersInputParams" для передачи параметров в этот метод.
        /// </summary>
        public void LettersInput()
        {
            #region Variable Declarations
            WinClient uIForm1Client    = this.UIForm1Window.UIForm1Client;
            WinEdit   uITextBoxOp1Edit = this.UIForm1Window.UITextBoxOp1Window.UITextBoxOp1Edit;
            WinEdit   uITextBoxOp2Edit = this.UIForm1Window.UITextBoxOp2Window.UITextBoxOp2Edit;
            WinButton uIItemButton     = this.UIForm1Window.UIItemWindow1.UIItemButton;
            #endregion

            // Щелкните "Form1" клиент
            Mouse.Click(uIForm1Client, new Point(147, 55));

            // Тип "a" в "textBoxOp1" надпись
            uITextBoxOp1Edit.Text = this.LettersInputParams.UITextBoxOp1EditText;

            // Щелкните "Form1" клиент
            Mouse.Click(uIForm1Client, new Point(141, 78));

            // Тип "b" в "textBoxOp2" надпись
            uITextBoxOp2Edit.Text = this.LettersInputParams.UITextBoxOp2EditText;

            // Тип "{Tab}" в "textBoxOp2" надпись
            Keyboard.SendKeys(uITextBoxOp2Edit, this.LettersInputParams.UITextBoxOp2EditSendKeys, ModifierKeys.None);

            // Тип "{Enter}" в "/" кнопка
            Keyboard.SendKeys(uIItemButton, this.LettersInputParams.UIItemButtonSendKeys, ModifierKeys.None);
        }
예제 #27
0
        /// <summary>
        /// RecordedMethod1 - Use 'RecordedMethod1Params' to pass parameters into this method.
        /// </summary>
        public void RecordedMethod1()
        {
            #region Variable Declarations
            WinEdit   uINameEdit        = this.UIDebugWindow.UIItemWindow.UIDigital_docs_wpfListItem.UINameEdit;
            WpfEdit   uILoginBoxEdit    = this.UILoginViewWindow.UILoginBoxEdit;
            WpfEdit   uIPasswordBoxEdit = this.UILoginViewWindow.UIPasswordBoxEdit;
            WpfButton uISigninButton    = this.UILoginViewWindow.UISigninButton;
            WinButton uIOKButton        = this.UIOKWindow.UIOKButton;
            WinButton uICloseButton     = this.UILoginViewWindow1.UICloseButton;
            #endregion

            // Double-Click 'Name' text box
            Mouse.DoubleClick(uINameEdit, new Point(106, 8));

            // Type 'test1' in 'LoginBox' text box
            uILoginBoxEdit.Text = this.RecordedMethod1Params.UILoginBoxEditText;

            // Type '{Tab}' in 'LoginBox' text box
            Keyboard.SendKeys(uILoginBoxEdit, this.RecordedMethod1Params.UILoginBoxEditSendKeys, ModifierKeys.None);

            // Type '********' in 'PasswordBox' text box
            Keyboard.SendKeys(uIPasswordBoxEdit, this.RecordedMethod1Params.UIPasswordBoxEditSendKeys, true);

            // Click 'Sign in' button
            Mouse.Click(uISigninButton, new Point(25, 7));

            // Click 'OK' button
            Mouse.Click(uIOKButton, new Point(92, 7));

            // Click 'Close' button
            Mouse.Click(uICloseButton, new Point(29, 16));
        }
        /// <summary>
        /// RecordedLogin - Use 'RecordedLoginParams' to pass parameters into this method.
        /// </summary>
        public void RecordedLogin()
        {
            #region Variable Declarations
            WinEdit   uINameEdit     = this.UIDebugWindow.UIItemWindow.UIWindowsFormsApp1exeListItem.UINameEdit;
            HtmlEdit  uIUsernameEdit = this.UIForm1Window.UIItemClient.UIAboutblankDocument.UIUsernameEdit;
            HtmlEdit  uIPasswordEdit = this.UIForm1Window.UIItemClient.UIAboutblankDocument.UIPasswordEdit;
            WinButton uIOKButton     = this.UIOKWindow.UIOKButton;
            #endregion

            // Wait for 1 seconds for user delay between actions; Click 'Name' text box
            Playback.Wait(1000);
            Mouse.Click(uINameEdit, new Point(165, 19));

            // Type 'zyg' in 'username' text box
            uIUsernameEdit.Text = this.RecordedLoginParams.UIUsernameEditText;

            // Type '{Tab}' in 'username' text box
            Keyboard.SendKeys(uIUsernameEdit, this.RecordedLoginParams.UIUsernameEditSendKeys, ModifierKeys.None);

            // Type '********' in 'password' text box
            uIPasswordEdit.Password = this.RecordedLoginParams.UIPasswordEditPassword;

            // Click 'OK' button
            Mouse.Click(uIOKButton, new Point(88, 24));
        }
예제 #29
0
        /// <summary>
        /// RecordedMethod1 - Use 'RecordedMethod1Params' to pass parameters into this method.
        /// </summary>
        public void RecordedMethod1()
        {
            #region Variable Declarations
            WinEdit    uIBillTextBoxEdit    = this.UIForm1Window.UIBillTextBoxWindow.UIBillTextBoxEdit;
            WpfControl uIEnterTotalBillEdit = this.UIForm1Window.UIEnterTotalBillEdit;
            WinWindow  uITipBoxWindow       = this.UIForm1Window.UIForm1Client.UITipBoxWindow;
            WinEdit    uITipBoxEdit         = this.UIForm1Window.UITipBoxWindow.UITipBoxEdit;
            WinClient  uIForm1Client        = this.UIForm1Window.UIForm1Client;
            WinButton  uIComputeTipButton   = this.UIForm1Window.UIComputeTipWindow.UIComputeTipButton;
            #endregion

            // Launch '%USERPROFILE%\source\repos\u1190338\Labs\Lab6\Lab6\bin\Debug\Lab6.exe'
            ApplicationUnderTest uIForm1Window = ApplicationUnderTest.Launch(this.RecordedMethod1Params.UIForm1WindowExePath, this.RecordedMethod1Params.UIForm1WindowAlternateExePath);

            // Click 'BillTextBox' text box
            Mouse.Click(uIBillTextBoxEdit, new Point(61, 4));

            // Double-Click 'BillTextBox' text box
            Mouse.DoubleClick(uIBillTextBoxEdit, new Point(61, 4));

            // Type '100' in 'Enter Total Bill' text box
            Keyboard.SendKeys(uIEnterTotalBillEdit, this.RecordedMethod1Params.UIEnterTotalBillEditSendKeys, ModifierKeys.None);

            // Click 'TipBox' window
            Mouse.Click(uITipBoxWindow, new Point(32, 1));

            // Type '20' in 'TipBox' text box
            uITipBoxEdit.Text = this.RecordedMethod1Params.UITipBoxEditText;

            // Click 'Form1' client
            Mouse.Click(uIForm1Client, new Point(301, 303));

            // Click 'Compute Tip' button
            Mouse.Click(uIComputeTipButton, new Point(132, 22));
        }
예제 #30
0
        public void CodedUITestMethod1()
        {
            BrowserWindow browser = BrowserWindow.Launch(new Uri("http://*****:*****@gmail.com");

            HtmlEdit Password_txtbox = new HtmlEdit(browser);

            Password_txtbox.SearchProperties.Add(HtmlEdit.PropertyNames.Id, "Password");
            Password_txtbox.SetFocus();
            Keyboard.SendKeys("144685");

            HtmlEdit ConPassword_txtbox = new HtmlEdit(browser);

            ConPassword_txtbox.SearchProperties.Add(HtmlEdit.PropertyNames.Id, "ConfirmPassword");
            ConPassword_txtbox.SetFocus();
            Keyboard.SendKeys("144685");
        }