예제 #1
0
        public void CMSDeleteExistingArticle()
        {
            LoginUser   user      = AccessExcelData.GetTLoginUserData("CreateNewArticle");
            BlogArticle article   = AccessExcelData.GetArticleTestData("DeleteExistingArticle");
            LoginPage   loginPage = new LoginPage(driver);
            CMSPage     cmsPage   = new CMSPage(driver);

            loginPage.NavigateTo();
            loginPage.FillCredentials(user);

            var         pathToArticleForDeletion = "//*[@class='col-sm-6']//descendant::a[contains(., '" + article.TargetForEdit + "')]";
            IWebElement articleToBeDeleted       = driver.FindElement(By.XPath(pathToArticleForDeletion));

            cmsPage.DeleteExistingArticle(articleToBeDeleted);

            IList <IWebElement> deletedArticleList = driver.FindElements(By.XPath(pathToArticleForDeletion));

            Assert.IsTrue(true, "true", deletedArticleList.Count > 0);
        }