Exemplo n.º 1
0
        public dynamic SelectNextButton()
        {
            dynamic page;
            string  currentUrl = WebDriver.Url;

            NextButton.ScrollIntoViewBottom();
            WaitForElementClickable(_btnNext);
            NextButton.ClickWithJS();
            if (IsElementDisplayed(_eleWarningBar, 3))
            {
                GetLastNode().Info("Closing warning bar");
                DismissButton.ClickWithJS();
                WaitForElementInvisible(_eleWarningBar);
                NextButton.ClickWithJS();
            }
            WaitForUrlChanged(currentUrl);
            if (WebDriver.Url.Contains("vehicle-suggestions"))
            {
                page = new VehicleSuggestionsPage();
            }
            else
            {
                page = new VehicleEntryPage();
            }
            page.WaitForPageLoad();
            return(page);
        }