Exemple #1
0
        public void EnterShippingAndForeignDetails(Customer customer)
        {
            SeleniumHelper.Click(locationCodeTB);
            SeleniumHelper.SendKeys(locationCodeTB, customer.locationCode);

            SeleniumHelper.Click(combineShipmentsCB);

            SeleniumHelper.Click(shippingMethodCodeTB);
            SeleniumHelper.SendKeys(shippingMethodCodeTB, customer.shippingMethod);

            SeleniumHelper.Click(shippingAgentCodeTB);
            SeleniumHelper.SendKeys(shippingAgentCodeTB, customer.shippingAgent);

            SeleniumHelper.Click(baseCalendarCodeTB);
            SeleniumHelper.SendKeys(baseCalendarCodeTB, customer.baseCalendarCode);

            SeleniumHelper.Click(currencyCodeTB);
            SeleniumHelper.SendKeys(currencyCodeTB, customer.currencyCode);

            SeleniumHelper.Click(languageCodeTB);
            SeleniumHelper.SendKeys(languageCodeTB, customer.languageCode);

            SeleniumHelper.Click(headerXLink);
            Thread.Sleep(500);
            SendKeys.SendWait("{TAB}");
            SendKeys.SendWait("{ENTER}");
        }
        public ProjectPage SelectProject(string projectName)
        {
            SeleniumHelper.Click(webDriver, By.XPath("//span[@class='drdn-trigger']"));
            SeleniumHelper.Click(webDriver, By.XPath("//a[@title='" + projectName + "']"));

            return(new ProjectPage(webDriver));
        }
Exemple #3
0
 public void ModifyPhoneNumber(string phoneNumber)
 {
     //SeleniumHelper.Wait(phoneNoTB);
     Thread.Sleep(1000);
     SeleniumHelper.SendKeys(phoneNoTB, phoneNumber);
     SeleniumHelper.Click(headerXLink);
 }
 public void ClickCustomer()
 {
     SeleniumHelper.Wait(1);
     if (SeleniumHelper.IsDisplayed(customerLink))
     {
         SeleniumHelper.Click(customerLink);
     }
 }
        public void SelectCustomerById(string customerID)
        {
            SeleniumHelper.Wait(1);
            SeleniumHelper.Click(customerLink);
            IWebElement customerToDelete = SeleniumDriver.Instance.FindElement
                                               (By.LinkText(customerID));

            SeleniumHelper.Click(customerToDelete);
        }
Exemple #6
0
 public void ChromeBrowserCustomerSetup()
 {
     SeleniumHelper.Click(invoicingMenuLink);
     Sleep();
     SeleniumHelper.Click(paymentsMenuLink);
     Sleep();
     SeleniumHelper.Click(shippingMenuLink);
     Sleep();
     SeleniumHelper.Click(foreignTradeMenuLink);
     Sleep();
 }
Exemple #7
0
        public TicketCompletePage CreateClick()
        {
            SeleniumHelper.Click(webDriver, By.XPath("//input[@name='commit']"));

            // 検証エラーチェック
            try
            {
                var element = webDriver.FindElement(By.Id("errorExplanation"));
                throw new Exception($"チケット登録失敗!{element.Text}");
            }
            catch (NoSuchElementException)
            {
                // 検証エラー時にだけ存在するので無い場合に成功になる
                return(new TicketCompletePage(webDriver));
            }
        }
Exemple #8
0
        public void EnterGeneralDetails(Customer newCustomer)
        {
            SeleniumHelper.Click(noTB);
            SeleniumHelper.SendKeys(noTB, newCustomer.number.ToString());

            SeleniumHelper.Click(nameTB);
            Thread.Sleep(500);
            SeleniumHelper.SendKeys(nameTB, newCustomer.name);

            SeleniumHelper.Click(addressTB);
            SeleniumHelper.SendKeys(addressTB, newCustomer.address);

            SeleniumHelper.Click(adress2TB);
            SeleniumHelper.SendKeys(adress2TB, newCustomer.address2);

            SeleniumHelper.Click(postCodeTB);
            SeleniumHelper.SendKeys(postCodeTB, newCustomer.postcode);
            //SendKeys.SendWait("{ESC}");

            SeleniumHelper.Click(cityTB);
            SeleniumHelper.SendKeys(cityTB, newCustomer.city);

            SeleniumHelper.Click(countryRegionTB);
            SeleniumHelper.SendKeys(countryRegionTB, newCustomer.country_region);

            SeleniumHelper.Click(phoneNoTB);
            SeleniumHelper.SendKeys(phoneNoTB, newCustomer.phoneNumber);

            SeleniumHelper.Click(searchNameTB);
            SeleniumHelper.SendKeys(searchNameTB, newCustomer.searchName);

            SeleniumHelper.Click(creditLimitTB);
            SeleniumHelper.SendKeys(creditLimitTB, newCustomer.creaditLimit);

            SeleniumHelper.Click(salespersonCodeTB);
            SeleniumHelper.SendKeys(salespersonCodeTB, newCustomer.salePersonCode);

            SeleniumHelper.Click(responsibilityCentreTB);
            SeleniumHelper.SendKeys(responsibilityCentreTB, newCustomer.responsibilityCenter);

            SeleniumHelper.Click(serviceZoneTB);
            SeleniumHelper.SendKeys(serviceZoneTB, newCustomer.serviceZoneCode);
        }
Exemple #9
0
        public Dashboard Login(string url, string loginId, string password)
        {
            webDriver.Url = url;
            Thread.Sleep(TimeSpan.FromSeconds(1));

            // SeleniumHelper.EnterTextById(webDriver, "email", loginId);
            SeleniumHelper.EnterText(webDriver, By.XPath("//input[@name='password']"), password);
            SeleniumHelper.EnterTextById(webDriver, "email", loginId);
            SeleniumHelper.Click(webDriver, By.XPath("//button[@type='submit']"));

            // 検証エラーチェック
            try
            {
                var element = webDriver.FindElement(By.XPath("//div[@class='alert alert-red'"));
                throw new Exception($"ログイン失敗!{element.Text}");
            }
            catch (NoSuchElementException)
            {
                // 検証エラー時にだけ存在するので無い場合に成功になる
                return(new Dashboard(webDriver));
            }
        }
Exemple #10
0
        public void EnterPaymentDetails(Customer customer)
        {
            SeleniumHelper.FromDownListTextSelect(applicationMethodTB, customer.applicationMethod);

            SeleniumHelper.FromDownListTextSelect(partnerTypeTB, customer.partnerType);

            SeleniumHelper.Click(paymentTermsTB);
            SeleniumHelper.SendKeys(paymentTermsTB, customer.paymentTerms);

            SeleniumHelper.Click(paymentMethodCodeTB);
            SeleniumHelper.SendKeys(paymentMethodCodeTB, customer.paymentMethods);

            SeleniumHelper.Click(reminderTermsCodeTB);
            SeleniumHelper.SendKeys(reminderTermsCodeTB, customer.reminderTerms);

            SeleniumHelper.Click(chargeTermsCodeTB);
            SeleniumHelper.SendKeys(chargeTermsCodeTB, customer.chargeTermCode);

            SeleniumHelper.Click(cashFlowPatmentTermsCodeTB);
            SeleniumHelper.SendKeys(cashFlowPatmentTermsCodeTB, customer.cashFlowPayment);

            SeleniumHelper.Click(printStatementCB);
        }
 public void AddItemToBasket()
 {
     SeleniumHelper.Click(FirstSize);
 }
 public void WhenIAmInAllPostPage()
 {
     SeleniumHelper.Click(PageObjects.MenuObjects.Posts_AllPost);
 }
 public void AddItemToBasket()
 {
     SelectSize("Size M (UK)");
     SelectQuantity("1");
     SeleniumHelper.Click(AddToBag);
 }
Exemple #14
0
 public void LoginAs(string username, string password)
 {
     selenium.SendKeys(textfieldUsername, username);
     selenium.SendKeys(textfieldPassword, password);
     selenium.Click(buttonLogin);
 }
 public void ThenIClickPublish()
 {
     SeleniumHelper.Click(PageObjects.AddNewObjects.PublishButton);
 }
Exemple #16
0
 public void SearchForItem()
 {
     SeleniumHelper.SendKeys(SearchQuery, "Jeans");
     SeleniumHelper.Click(SearchSubmit);
 }
Exemple #17
0
 public void NavigateToBag()
 {
     SeleniumHelper.Click(BasketValue);
 }
Exemple #18
0
 public void WhenIClickLogin()
 {
     SeleniumHelper.Click(LoginPageObjects.Login_Button);
 }
 public TicketListPage SelectTicketTab()
 {
     SeleniumHelper.Click(webDriver, By.XPath("//a[@class='issues']"));
     return(new TicketListPage(webDriver));
 }
 public void WhenIClickAddNewButton()
 {
     SeleniumHelper.Click(PageObjects.MenuObjects.Posts_AddNew);
 }
 public NewTicketPage MoveTicketPage()
 {
     SeleniumHelper.Click(webDriver, By.XPath("//a[@class='icon icon-add new-issue']"));
     return(new NewTicketPage(webDriver));
 }
 public void ClickCreateNewCustomer()
 {
     SeleniumHelper.Click(createNewEntry);
 }
Exemple #23
0
 public void GoToFirstItem()
 {
     SeleniumHelper.Click(FirstItem);
 }
Exemple #24
0
 public static void Login()
 {
     SeleniumHelper.EnterKey(PageObjects.LoginPageObjects.Username_Input, username);
     SeleniumHelper.EnterKey(PageObjects.LoginPageObjects.Password_Input, password);
     SeleniumHelper.Click(PageObjects.LoginPageObjects.Login_Button);
 }