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); }
public RentalAgreementPage GoToTabRentalAgreement() { Actions action = new Actions(driver); action.MoveToElement(UsefulMenuButton).Perform(); WaiterOfItemLoad.WaitUntilElementToBeClickable(driver, RentalAgreementSubmenuButton); RentalAgreementSubmenuButton.Click(); return(new RentalAgreementPage(driver)); }
public TransportOutsourcingPage GoToTabTransportOutsourcing() { Actions action = new Actions(driver); action.MoveToElement(ServicesMenuButton).Perform(); WaiterOfItemLoad.WaitUntilElementToBeClickable(driver, TransportOutsourcingSubMenuButton); TransportOutsourcingSubMenuButton.Click(); return(new TransportOutsourcingPage(driver)); }
public OnlinePaymentPage GoToTabOnlinePayment() { Actions action = new Actions(driver); action.MoveToElement(RequirementMenuButton).Perform(); WaiterOfItemLoad.WaitUntilElementToBeClickable(driver, OnlinePaymentSubmenuButton); OnlinePaymentSubmenuButton.Click(); return(new OnlinePaymentPage(driver)); }
public CalculatePage FillCalculationParametrs() { WaiterOfItemLoad.WaitUntilElementToBeClickable(driver, LimitationOfLiabilityCheckBox); LimitationOfLiabilityCheckBox.Click(); ReductionOfAgeAndSeniorityCheckBox.Click(); new Actions(driver).MoveToElement(RetutnsDayCalendarButton).Build().Perform(); PickTenDaysLeftDate(RetutnsDayCalendarButton); return(this); }
public bool IsConfirmOrderImageDisplayed() { try { WaiterOfItemLoad.WaitUntilElementDisplayed(driver, ConfirmOrderImage); return(ConfirmOrderImage.Displayed); } catch { return(ConfirmOrderImage.Displayed); } }
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)); }
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); }
public int GetLimitationOfLiabilityOptionPriceCost() { WaiterOfItemLoad.WaitUntilTextDontEmpty(driver, LimitationOfLiabilityOptionField); return(Int32.Parse(LimitationOfLiabilityOptionField.Text.Replace(" ", ""))); }
public int GetGpsOptionPriceCost() { WaiterOfItemLoad.WaitUntilTextDontEmpty(driver, GpsOptionCostField); return(Int32.Parse(GpsOptionCostField.Text.Replace(" ", ""))); }
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"); }