public void CMSCreateArticleWithLongTitle() { LoginUser user = AccessExcelData.GetTLoginUserData("CreateNewArticle"); BlogArticle article = AccessExcelData.GetArticleTestData("CreateArticleWithLongTitle"); LoginPage loginPage = new LoginPage(driver); CMSPage cmsPage = new CMSPage(driver); loginPage.NavigateTo(); loginPage.FillCredentials(user); cmsPage.FillArticleForm(article); Assert.IsTrue(cmsPage.ErrorMessageForEmptyTitleOrContent.Contains(article.ArticleErrorMessage)); }
public void CMSCreateNewArticleWithValidData() { LoginUser user = AccessExcelData.GetTLoginUserData("CreateNewArticle"); BlogArticle article = AccessExcelData.GetArticleTestData("CreateNewArticleWithValidData"); LoginPage loginPage = new LoginPage(driver); CMSPage cmsPage = new CMSPage(driver); loginPage.NavigateTo(); loginPage.FillCredentials(user); cmsPage.FillArticleForm(article); var pathToArticle = "//*[@class='col-sm-6']//descendant::a[contains(., '" + article.Title + "')]"; IList <IWebElement> articleList = driver.FindElements(By.XPath(pathToArticle)); Assert.IsTrue(true, "True", articleList.Count > 0); }