Esempio n. 1
0
        public void DownloadSourceCode(string categoryName, string articleName)
        {
            _homePage.NavigateTo();
            _homePage.AssertFindHowText(categoryName);
            var findHowButton = _homePage.GetFindHowButtonByText(categoryName);

            findHowButton.Click();

            _categoryPage.AssertCategoryBackgroundWhenSelected(categoryName);
            var articleAnchor = default(IWebElement);

            do
            {
                try
                {
                    articleAnchor = _categoryPage.GetArticleAnchorByName(articleName);
                }
                catch (NoSuchElementException)
                {
                    _categoryPage.NavigateToNextPage();
                }
            }while (articleAnchor == null);
            articleAnchor.Click();

            _articlePage.DownloadFullSourceCode.Click();
        }
 protected override void Assert()
 {
     _categoryPage.AssertCategoryBackgroundWhenSelected(_categoryText);
 }