use of com.wikia.webdriver.pageobjectsfactory.pageobject.article.ArticlePageObject in project selenium-tests by Wikia.
the class VisualEditorEntryTests method VisualEditorEntryTest_007_template.
@Test(groups = { "VisualEditorEntry", "VisualEditorEntryTest_007", "templateEntry" }, dataProviderClass = VisualEditorDataProvider.class, dataProvider = "templateEntryPoints")
public void VisualEditorEntryTest_007_template(boolean isRTEext, boolean isVEext, EditorPref editorPref, Editor expectedEditor) {
wikiURL = urlBuilder.getUrlForWiki(VisualEditorDataProvider.getTestWiki(isRTEext, isVEext));
ArticlePageObject article = new ArticlePageObject();
article.loginAs(credentials.getUserBaseOnEditorPref(editorPref), credentials.getPassBaseOnEditorPref(editorPref), wikiURL);
article.open(URLsContent.TEMPLATE_PAGE);
article.verifyMainEditEditor(expectedEditor);
}
use of com.wikia.webdriver.pageobjectsfactory.pageobject.article.ArticlePageObject in project selenium-tests by Wikia.
the class NavigationBar method ArrowDownAndEnterSuggestion.
/**
* Arrow down through suggestions, and click enter on the desired one
*/
public ArticlePageObject ArrowDownAndEnterSuggestion(String suggestionText) {
wait.forElementVisible(suggestionsList.get(0));
int position = 0;
for (WebElement suggestion : suggestionsList) {
if (suggestion.getText().contains(suggestionText)) {
position++;
}
}
Assertion.assertNotEquals(0, position, "suggestion " + suggestionText + "not found");
if (position != 0) {
for (int i = 0; i < position; i++) {
searchInput.sendKeys(Keys.ARROW_DOWN);
}
searchInput.sendKeys(Keys.ENTER);
PageObjectLogging.log("ArrowDownToSuggestion", "arrowed down to desired suggestion" + suggestionText + "and clicked enter", true);
return new ArticlePageObject();
} else {
return null;
}
}
use of com.wikia.webdriver.pageobjectsfactory.pageobject.article.ArticlePageObject in project selenium-tests by Wikia.
the class InteractiveMapPageObject method openEmbedMapPageEdit.
public WikiArticleEditMode openEmbedMapPageEdit(String wikiURL) {
ArticlePageObject article = new ArticlePageObject();
article.navigateToArticleEditPage(wikiURL, URLsContent.EMBEDED_MAP_ARTICLE);
return new WikiArticleEditMode();
}
use of com.wikia.webdriver.pageobjectsfactory.pageobject.article.ArticlePageObject in project selenium-tests by Wikia.
the class CreateNewWikiPageObjectStep3 method submit.
public ArticlePageObject submit() {
changeImplicitWait(250, TimeUnit.MILLISECONDS);
try {
new WebDriverWait(driver, 180).until(CommonExpectedConditions.elementNotPresent(loadingIndicatorBy));
} finally {
restoreDefaultImplicitWait();
}
scrollAndClick(submitButton);
PageObjectLogging.log("submit", "Submit button clicked", true, driver);
return new ArticlePageObject();
}
use of com.wikia.webdriver.pageobjectsfactory.pageobject.article.ArticlePageObject 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);
}
Aggregations