Example #1
0
        public void CheckNameOfHeadLineArticle()
        {
            //Arrange
            CookiesPage.AgreeToAllTheCookies();

            //Act
            NewsPage.ClickOnNewsElement();
            SignInPage.ClickOnSignInLaterButton();
            BasePage.ImplicitWait();

            //Assert
            Assert.AreEqual(expectedNameOfHeadlineArticle, NewsPage.GetNameOfHeadlineArticle());
        }
Example #2
0
        public void SearchByCategoryKeyword()
        {
            //Arrange
            CookiesPage.AgreeToAllTheCookies();

            //Act
            CategorySearchPage.CopyTheTextOfChoosenCategory();
            SignInPage.ClickOnSignInLaterButton();
            string textOfCategory = SearchPage.GetTextOfCategory();

            CategorySearchPage.SearchArticlesByPastingCopiedKeywordIntoASearchField();

            //Assert
            Assert.IsTrue(SearchPage.NameOfFirstArticleInSearchByCategoryResults().Contains(textOfCategory));
        }
Example #3
0
        public void CheckSecondaryArticlesNames()
        {
            //Arrange
            CookiesPage.AgreeToAllTheCookies();

            //Act
            NewsPage.ClickOnNewsElement();
            SignInPage.ClickOnSignInLaterButton();
            BasePage.ImplicitWait();

            //Assert
            Assert.AreEqual(expectedSecondaryArticleNameIndex0, NewsPage.SecondaryArticles[0].Text);
            Assert.AreEqual(expectedSecondaryArticleNameIndex13, NewsPage.SecondaryArticles[13].Text);
            Assert.AreEqual(amountOfSecondaryArticles, NewsPage.SecondaryArticlesAmount());
        }
Example #4
0
        public CommonElements()
        {
            // arrange
            d                  = new DriverFactory();
            driver             = d.CreateDriver();
            loginPage          = new LoginPage(driver);
            homePage           = new HomePage(driver);
            typeOfBusinessPage = new TypeOfBusinessPage(driver);
            header             = new Header(driver);
            footer             = new Footer(driver);
            privacyPage        = new PrivacyPage(driver);
            cookiesPage        = new CookiesPage(driver);
            tAndCpage          = new TAndCPage(driver);

            HttpClientHelper.ClearUserData($"***REMOVED***");

            loginPage.Login(d.Url);
            homePage.ApplyOnline();
        }