public static VehicleEntryPage YesMoreVehicle(this AddAnotherVehiclePage addAnotherVehiclePage) { ParameterValidator.ValidateNotNull(addAnotherVehiclePage, "AddAnotherVehicle"); // Select decision when prompted to add more vehicle addAnotherVehiclePage.SelectAddMoreVehicleButton(AnswerOption.Yes); // Select Next Button VehicleEntryPage vinEntryPage = addAnotherVehiclePage.SelectNextButton <VehicleEntryPage>(); //Verification vinEntryPage.ValidateVehicleEntryPageDisplayed(); return(vinEntryPage); }
public static DriverEnterPage NoMoreVehicle(this AddAnotherVehiclePage addAnotherVehiclePage) { ParameterValidator.ValidateNotNull(addAnotherVehiclePage, "addAnotherVehiclePage"); // Select decsion when prompted to add more vehicle addAnotherVehiclePage.SelectAddMoreVehicleButton(AnswerOption.No); // Select next button DriverEnterPage driverEnterPage = addAnotherVehiclePage.SelectNextButton <DriverEnterPage>(); //Verification driverEnterPage.ValidateDriverEnterPageDisplayed(); return(driverEnterPage); }
public static T NoMoreVehicle <T>(this AddAnotherVehiclePage addAnotherVehiclePage) where T : BasePage { ParameterValidator.ValidateNotNull(addAnotherVehiclePage, "AddAnotherVehiclePage"); // Select decsion when prompted to add more vehicle addAnotherVehiclePage.SelectAddMoreVehicleButton(AnswerOption.No); // Select next button dynamic currentPage = addAnotherVehiclePage.SelectNextButton <T>(); if (typeof(T) == typeof(VehicleOverviewPage)) { //verification currentPage.ValidateOverViewPageDisplayed(); } else { //verification currentPage.ValidateDriverEnterPageDisPlayed(); } return(currentPage); }