Пример #1
0
        /// <summary>
        /// Get results only for status as "Validated with Issues"
        /// </summary>
        public IWebElement GetSearchResults(string status)
        {
            var censusTripletPage = new CensusPage();

            censusTripletPage.SearchCriteria.ReturnTypeDropdown        = "School Census Return";
            censusTripletPage.SearchCriteria.ReturnTypeVersionDropdown = "Spring 2017";
            SearchCriteria.Search();
            ReadOnlyCollection <IWebElement> searchResultCollection = SearchResults.GetSearchResults();

            foreach (IWebElement element in searchResultCollection)
            {
                ReadOnlyCollection <IWebElement> resultTiles = element.FindElements(By.CssSelector(string.Format("{0} {1}",
                                                                                                                 SeleniumHelper.AutomationId("resultTile"), "span")));
                foreach (IWebElement resultTile in resultTiles)
                {
                    if (resultTile.Text == status)
                    {
                        return(element);
                    }
                }
            }
            return(null);
        }