public static bool WaitingFor_UrlToBe(IWebDriver driver, PageAlias alias, TimeSpan timeOut)
        {
            var url  = RouteMapper.ConvertAliasToUrl(alias);
            var wait = new WebDriverWait(driver, timeOut);

            return(wait.Until(ExpectedConditions.UrlToBe(url)));
        }
        public void NavigateToUnstablePage(PageAlias pageAlias, bool isCheckPage)
        {
            if (this.CurrentPage == pageAlias)
            {
                return;
            }

            var url = RouteMapper.ConvertAliasToUrl(pageAlias);

            _driver.Url = url;
        }
        public void NavigateTo(PageAlias pageAlias, bool isCheckPage)
        {
            if (this.CurrentPage == pageAlias)
            {
                return;
            }

            var url = RouteMapper.ConvertAliasToUrl(pageAlias);

            _driver.Url = url;

            if (isCheckPage && !WebElementKeeper.WaitingFor_UrlToBe(_driver, pageAlias))
            {
                throw new Exception(string.Format("Navigate To : {0} faild!", pageAlias));
            }
        }
        public static bool WaitingFor_UrlContains(IWebDriver driver, PageAlias alias)
        {
            var uri = RouteMapper.ConvertAliasToUri(alias);

            return(WaitingFor_UrlContains(driver, uri));
        }