Beispiel #1
0
        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);
        }
Beispiel #2
0
        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);
        }
Beispiel #3
0
        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);
        }