use of com.wikia.webdriver.pageobjectsfactory.componentobject.editcategory.EditCategoryComponentObject in project selenium-tests by Wikia.
the class ArticlePageObject method editCategory.
public EditCategoryComponentObject editCategory(String category) {
WebElement editCategory = driver.findElement(By.cssSelector(editCategorySelector.replace("%categoryName%", category)));
scrollAndClick(editCategory);
PageObjectLogging.log("editCategory", "edit button on category " + category + " clicked", true);
return new EditCategoryComponentObject(driver);
}
use of com.wikia.webdriver.pageobjectsfactory.componentobject.editcategory.EditCategoryComponentObject in project selenium-tests by Wikia.
the class VisualEditModePageObject method editCategory.
public EditCategoryComponentObject editCategory(String categoryName) {
WebElement editCategory = driver.findElement(By.cssSelector(categoryEditSelector.replace("%categoryName%", categoryName)));
WebElement category = driver.findElement(By.cssSelector(".category[data-name='" + categoryName + "']"));
new Actions(driver).moveToElement(category).sendKeys(Keys.ARROW_DOWN).sendKeys(Keys.ARROW_DOWN).perform();
scrollAndClick(editCategory);
PageObjectLogging.log("editCategory", "edit category button clicked on category " + categoryName, true);
return new EditCategoryComponentObject(driver);
}
use of com.wikia.webdriver.pageobjectsfactory.componentobject.editcategory.EditCategoryComponentObject in project selenium-tests by Wikia.
the class CategoriesArticleTests method CategoriesTestsArticle_005_anonEdit.
@Test(groups = { "CategoriesTestsArticle_005", "CategoriesTestsArticle" })
public void CategoriesTestsArticle_005_anonEdit() {
new ArticleContent().push(PageContent.ARTICLE_TEXT);
ArticlePageObject article = new ArticlePageObject().open();
String categoryName = PageContent.CATEGORY_NAME_PREFIX + DateTime.now().getMillis();
article.addCategory(categoryName);
EditCategoryComponentObject editCategory = article.editCategory(categoryName);
categoryName = PageContent.CATEGORY_NAME_PREFIX + DateTime.now().getMillis();
editCategory.editCategoryName(categoryName);
article.submitCategory();
article.verifyCategoryPresent(categoryName);
}
use of com.wikia.webdriver.pageobjectsfactory.componentobject.editcategory.EditCategoryComponentObject in project selenium-tests by Wikia.
the class CategoriesTestsEditMode method CategoriesTestsArticleEdit_001_anonEdit.
@Test(groups = { "CategoriesTestsArticleEdit_001", "CategoriesTestsArticleEditMode" })
public void CategoriesTestsArticleEdit_001_anonEdit() {
WikiBasePageObject base = new WikiBasePageObject();
String articleName = PageContent.ARTICLE_NAME_PREFIX + base.getTimeStamp();
VisualEditModePageObject visual = base.navigateToArticleEditPage(wikiURL, articleName);
String categoryName = PageContent.CATEGORY_NAME_PREFIX + visual.getTimeStamp();
visual.typeCategoryName(categoryName);
visual.submitCategory();
visual.verifyCategoryPresent(categoryName);
EditCategoryComponentObject editCategory = visual.editCategory(categoryName);
categoryName = PageContent.CATEGORY_NAME_PREFIX + visual.getTimeStamp();
editCategory.editCategoryName(categoryName);
visual.verifyCategoryPresent(categoryName);
}
Aggregations