コード例 #1
0
ファイル: Customer.cs プロジェクト: rsdivahar/teststack-white
        public bool AddNewCustomer()
        {
            Boolean bResults = false;

            try
            {
                this.OpenCustomerWindow();

                ClickOnButton(wCustomerWin, ButtonConstants.BTN_ADD_CUST);
                LoggerUtility.WriteLog("Clicked the Add");

                Window wCustomerAddWin = GetChildWindowByID(wCustomerWin, AppConstants.WIN_CUSTOMER_ADD);
                wCustomerAddWin.WaitWhileBusy();

                PropertyGrid FirstNamePlaceHolder = wCustomerAddWin.Get <PropertyGrid>(SearchCriteria.ByAutomationId("C_CUSTOMERFIELD_1"));
                LoggerUtility.WriteLog("Got the wCustomerAddWin Control, going to Perform Entry");
                TextBox txtAddCust = FirstNamePlaceHolder.Get <TextBox>(SearchCriteria.ByClassName("WindowsForms10.RichEdit20W.app.0.1a8c1fa_r14_ad1"));
                txtAddCust.Focus();
                txtAddCust.Text = "Sahaya";

                LoggerUtility.WriteLog("Jerish Name Entered");
                Thread.Sleep(10000);
                return(true);
            }
            catch
            {
                LoggerUtility.WriteLog("Failure Message: Failed to Select the Customer");
                return(bResults);

                throw;
            }
        }