public void SetUp() { // Before each test browser = BrowserFactory.Launch(BrowserType.InternetExplorer); browser.Navigate("https://auto-buy-gz-user1.geico.com/"); GeicoApp GAM = new GeicoApp(browser); GAM.ErrorPage.ContinueLink.Click(); customer = new CustomerInfoPage(browser); vehicle = new VehicleInfoPage(browser); }
public void Create_sale_order_from_saleman() { Report_Log_Instance("Step 01 : Create sale order from saleman", Level.Root); Report_Log_Instance("Step 01.a : Login to PDA", Level.Level01); var Info = new MobileLoginInformation { User = "******", Language = "English", }; MbLoginPage.InstancePO.Login_to_PDA_for_MBL(Info); Report_Log_Instance("Step 01.a : Create_sale_order_from_saleman", Level.Level01); HomePageMobile.InstancePO.Open_visit_order(); using (var VisitOrder = new VisitOrderPage()) { VisitOrder.Search_customer_and_select_customer(CustomerID); using (var CustomerInfo = new CustomerInfoPage()) { CustomerInfo.Visit_customer(); using (var VisitCustomer = new VisitCustomerPage()) { VisitCustomer.Open_make_order_menu_with_presale(); using (var PresaleOrder = new PresaleOrderPage()) { RemarkSaleOrderSM = RemarkSaleOrderSM + DateTimes._todayFull; PresaleOrder.Do_order_and_confirm(RemarkSaleOrderSM); using (var Alert = new AlertPage()) { Alert.Click_confirm_button(); } } VisitCustomer.End_visit_customer_with_message_successfully(); } } } }
public static VehicleInfoPage EnterCustomerInformation(this EffectiveDatePage effectiveDatePage, CustomerInformation customerInformation) { ParameterValidator.ValidateNotNull(effectiveDatePage, "EffectiveDatePage"); ParameterValidator.ValidateNotNull(customerInformation, "Customer Information"); //1. Enter customer @effectivedate and select next DotNumberPage dotNumberPage = effectiveDatePage.SelectEffectiveDate(customerInformation.EffectiveDate).SelectNextButton(); // verification dotNumberPage.ValidateDotNumberPageDisplayed(); //2. Enter @DOTInfo EntityTypePage entityTypePage = dotNumberPage.EnterDotNumber(customerInformation.DotNumber); //3. Select @EntityType and select next BusinessInformationPage businessInformationPage = entityTypePage.SelectEntityType(customerInformation.EntityType) .SelectNextButton(); // verification businessInformationPage.ValidateBusinessInformationPageDisplayed(); //4. If valid DOT was given, confrim business @name and @address and select next // If no Dot or invalid DOT was given, complete @name and @address and select next if (customerInformation.FilledOutBusinessInformation != null) { businessInformationPage.ValidateBusinessNameIsFilledOut(customerInformation.FilledOutBusinessInformation.CustomerName) .ValidateDBAIsFilledOut(customerInformation.FilledOutBusinessInformation.DBA) .ValidateAddressFieldsAreFilledOut(customerInformation.FilledOutBusinessInformation.Address); } if (customerInformation.BusinessInformation != null) { businessInformationPage.InputBusinessInformation(customerInformation.BusinessInformation); } PrimaryOfficerPage primaryOfficerPage = businessInformationPage.SelectNextButton(); //verification primaryOfficerPage.ValidatePrimaryOfficerPageDisplayed(); //5. Enter Primary officer information (@POName, @POAddress) and select next CustomerInfoPage customerInfoPage = new CustomerInfoPage(); if (customerInformation.EntityType == "Individual") { // verification primaryOfficerPage.ValidatePrimaryOfficerNameAreFilledOut(customerInformation.POName).ValidatePrimaryOfficerNameDisabled(); // Enter POAddress primaryOfficerPage.InputPrimaryOfficerAddress(customerInformation.POAddress).SelectNextButton(); } else { //Enter POName and POAddress primaryOfficerPage.InputPrimaryOfficer(customerInformation.POName, customerInformation.POAddress).SelectNextButton(); } //verification customerInfoPage.ValidateCustomerInfoPageDisplayed(); //6. Enter @LiabilityLosses and select Next VehicleInfoPage vehicleInfoPage = customerInfoPage.EnterCustomerInfo(customerInformation.CustomerAdditionalInformation).SelectNextButton(); //verification vehicleInfoPage.ValidateVehicleInfoPageDisplayed(); return(vehicleInfoPage); }