Exemple #1
0
        public MainPage FillInFieldDataForRentInOneHour(OrderData orderData) //model needed
        {
            ClassChange.Click();

            ComboBoxAutoClass.FindElements(By.TagName("li"))
            .Select(c => c)
            .Where(c => c.Text == orderData.CarClass)
            .First()
            .Click();
            WaiterOfItemLoad.WaitUntilText(driver, ClassChange, orderData.CarClass); // wait until see this change but next comboboxx button is not clickable without Sleep

            Thread.Sleep(250);
            AutoChange.Click();

            ComboBoxAuto.FindElements(By.TagName("li"))
            .Select(c => c)
            .Where(c => c.Text == orderData.Automobile)
            .First()
            .Click();

            WaiterOfItemLoad.WaitUntilText(driver, AutoChange, orderData.Automobile); //wait until see this change but next comboboxx button is not clickable without Sleep
            Thread.Sleep(250);
            DateOfIssue.Click();
            PhoneNumber.SendKeys(orderData.MobilePhone);
            return(this);
        }
Exemple #2
0
        public RentalAgreementPage GoToTabRentalAgreement()
        {
            Actions action = new Actions(driver);

            action.MoveToElement(UsefulMenuButton).Perform();
            WaiterOfItemLoad.WaitUntilElementToBeClickable(driver, RentalAgreementSubmenuButton);
            RentalAgreementSubmenuButton.Click();
            return(new RentalAgreementPage(driver));
        }
Exemple #3
0
        public TransportOutsourcingPage GoToTabTransportOutsourcing()
        {
            Actions action = new Actions(driver);

            action.MoveToElement(ServicesMenuButton).Perform();
            WaiterOfItemLoad.WaitUntilElementToBeClickable(driver, TransportOutsourcingSubMenuButton);
            TransportOutsourcingSubMenuButton.Click();
            return(new TransportOutsourcingPage(driver));
        }
Exemple #4
0
        public OnlinePaymentPage GoToTabOnlinePayment()
        {
            Actions action = new Actions(driver);

            action.MoveToElement(RequirementMenuButton).Perform();
            WaiterOfItemLoad.WaitUntilElementToBeClickable(driver, OnlinePaymentSubmenuButton);
            OnlinePaymentSubmenuButton.Click();
            return(new OnlinePaymentPage(driver));
        }
Exemple #5
0
 public CalculatePage FillCalculationParametrs()
 {
     WaiterOfItemLoad.WaitUntilElementToBeClickable(driver, LimitationOfLiabilityCheckBox);
     LimitationOfLiabilityCheckBox.Click();
     ReductionOfAgeAndSeniorityCheckBox.Click();
     new Actions(driver).MoveToElement(RetutnsDayCalendarButton).Build().Perform();
     PickTenDaysLeftDate(RetutnsDayCalendarButton);
     return(this);
 }
Exemple #6
0
 public bool IsConfirmOrderImageDisplayed()
 {
     try
     {
         WaiterOfItemLoad.WaitUntilElementDisplayed(driver, ConfirmOrderImage);
         return(ConfirmOrderImage.Displayed);
     }
     catch
     {
         return(ConfirmOrderImage.Displayed);
     }
 }
Exemple #7
0
        public CarsPage GoToTabChevroletCars()
        {
            Actions action = new Actions(driver);

            action.MoveToElement(AutoparkMenuButton).Perform();
            WaiterOfItemLoad.WaitUntilElementToBeClickable(driver, ByBrandSubmenuButton);
            action.MoveToElement(ByBrandSubmenuButton).Perform();
            WaiterOfItemLoad.WaitUntilElementToBeClickable(driver, ChevreletSubMenuButton);
            action.MoveToElement(ByBrandSubmenuButton).Perform();
            ChevreletSubMenuButton.Click();
            return(new CarsPage(driver));
        }
Exemple #8
0
        public string GetTextFromAlert()
        {
            string error = "";

            try
            {
                WaiterOfItemLoad.WaitUntilAlert(driver);
            }
            catch
            {
                return(null);
            }
            var alert = driver.SwitchTo().Alert();

            if (alert != null)
            {
                error = alert.Text;
                alert.Accept();
            }
            return(error);
        }
Exemple #9
0
 public int GetLimitationOfLiabilityOptionPriceCost()
 {
     WaiterOfItemLoad.WaitUntilTextDontEmpty(driver, LimitationOfLiabilityOptionField);
     return(Int32.Parse(LimitationOfLiabilityOptionField.Text.Replace(" ", "")));
 }
Exemple #10
0
 public int GetGpsOptionPriceCost()
 {
     WaiterOfItemLoad.WaitUntilTextDontEmpty(driver, GpsOptionCostField);
     return(Int32.Parse(GpsOptionCostField.Text.Replace(" ", "")));
 }
Exemple #11
0
 public int GetFullCost()
 {
     WaiterOfItemLoad.WaitUntilTextDontEmpty(driver, FullCostField);
     return(Int32.Parse(FullCostField.Text.Replace(" ", "")));
 }
 public bool GetErrorState()
 {
     WaiterOfItemLoad.WaitUntilClassName(driver, paymentAmountField, "input_text_style err_mess");
     return(paymentAmountField.GetAttribute("class") == "input_text_style err_mess");
 }