Example #1
0
        public static CoveragesPage NoMoreDriver(this AddAnotherDriverPage addAnotherDriverPage)
        {
            ParameterValidator.ValidateNotNull(addAnotherDriverPage, "AddAnotherDriverPage");

            // Select decision when promted to add more driver
            addAnotherDriverPage.SelectAddMoreDriverButton(AnswerOption.No);
            //Select Next Button
            CoveragesPage coveragesPage = addAnotherDriverPage.SelectNextButton <CoveragesPage>();

            //verification
            coveragesPage.ValidateCoveragesPageDisplayed();
            return(coveragesPage);
        }
Example #2
0
        public static DriverEnterPage YesMoreDriver(this AddAnotherDriverPage addAnotherDriverPage)
        {
            ParameterValidator.ValidateNotNull(addAnotherDriverPage, "AddAnotherDriverPage");

            // Select decision when promted to add more driver
            addAnotherDriverPage.SelectAddMoreDriverButton(AnswerOption.Yes);
            //Select Next Button
            DriverEnterPage driverEnterPage = addAnotherDriverPage.SelectNextButton <DriverEnterPage>();

            //verification
            driverEnterPage.ValidateDriverEnterPageDisplayed();
            return(driverEnterPage);
        }
Example #3
0
        public static T NoMoreDriver <T>(this AddAnotherDriverPage addAnotherDriverPage) where T : BasePage
        {
            ParameterValidator.ValidateNotNull(addAnotherDriverPage, "AddAnotherDriverPage");
            //Select next button
            dynamic currentPage = addAnotherDriverPage.SelectNextButton <T>();

            if (typeof(T) == typeof(DriverOverviewPage))
            {
                // Verification
                currentPage.ValidateValidateDriverOverViewPageDisplayed();
            }
            else
            {
                // Verification
                currentPage.ValidateCoveragesPageDisplayed();
            }
            return(currentPage);
        }