Example #1
0
        public SearchListResultsComponent <TResultTile> Search()
        {
            Retry.Do(_searchButton.Click);
            SearchListResultsComponent <TResultTile> results = null;

            //Thread.Sleep(500);
            //Wait.WaitUntilEnabled(By.CssSelector("[data-automation-id='search_criteria_submit']"));
            Wait.WaitForAjaxReady(By.CssSelector("[data-automation-id='search_criteria_submit'][disabled='disabled']"));
            // Retry.Do(() =>
            //{
            results = new SearchListResultsComponent <TResultTile>(_parent);
            // });

            return(results);
        }
Example #2
0
        public SearchListResultsComponent <TResultTile> Search()
        {
            WebDriverWait wait = new WebDriverWait(WebContext.WebDriver, TimeSpan.FromSeconds(10));
            Stopwatch     sw   = new Stopwatch();

            sw.Start();
            AutomationSugar.ClickOn(new ByChained(this._parent.ComponentIdentifier, SimsBy.AutomationId("search_criteria_submit")));
            _logger.LogLine("Waiting and clicking on search button took {0}ms.", sw.ElapsedMilliseconds);
            wait.Until(ExpectedConditions.ElementIsVisible(new ByChained(this._parent.ComponentIdentifier, SimsBy.AutomationId("resultTile"))));
            _logger.LogLine("Waiting search results took {0}ms.", sw.ElapsedMilliseconds);
            SearchListResultsComponent <TResultTile> results = new SearchListResultsComponent <TResultTile>(_parent);

            _logger.LogLine("Binding seach results tool {0}ms.", sw.ElapsedMilliseconds);
            sw.Stop();
            return(results);
        }