コード例 #1
0
        public void SearchForAGivenWordNumberOfArticlesOnPage()
        {
            PlasticAndReconstructiveSurgeryPage surgeryPage = new PlasticAndReconstructiveSurgeryPage(driver);

            SearchActions.SearchForWord(surgeryPage.SearchBox, surgeryPage.SearchButton, searchWord);

            IList <IWebElement> listOfArticles = surgeryPage.FoundArticles();

            Assert.AreEqual(60, listOfArticles.Count());
        }
コード例 #2
0
        public void SearchForAGivenNumberOfArticlesOnSpecialPage()
        {
            PlasticAndReconstructiveSurgeryPage surgeryPage = new PlasticAndReconstructiveSurgeryPage(driver);

            SearchActions.SearchForWord(surgeryPage.SearchBox, surgeryPage.SearchButton, searchWord);

            var buttons = surgeryPage.PageButton(numOfPage);

            while (buttons.Count() == 0)
            {
                surgeryPage.NextLink.Click();
                buttons = surgeryPage.PageButton(numOfPage);
            }
            surgeryPage.PageButton(numOfPage).ElementAt(0).Click();
            Assert.AreEqual(60, surgeryPage.FoundArticles().Count());
        }