use of com.wikia.webdriver.pageobjectsfactory.pageobject.visualeditor.VisualEditorPageObject in project selenium-tests by Wikia.
the class ArticlePageObject method openVEModeWithRedLinks.
public VisualEditorPageObject openVEModeWithRedLinks(int linkNumber) {
WebElement redLinkToClick = redLinks.get(linkNumber);
VECreateArticleModalComponentObject veArticleModal = clickVERedLink(redLinkToClick);
veArticleModal.createPage();
return new VisualEditorPageObject();
}
use of com.wikia.webdriver.pageobjectsfactory.pageobject.visualeditor.VisualEditorPageObject in project selenium-tests by Wikia.
the class ArticlePageObject method verifyMainEditEditor.
public void verifyMainEditEditor(Editor expectedEditor) {
switch(expectedEditor) {
case VE:
VisualEditorPageObject ve = openVEModeWithMainEditButton();
ve.verifyVEToolBarPresent();
ve.verifyEditorSurfacePresent();
break;
case CK:
VisualEditModePageObject ck = openCKModeWithMainEditButton();
Assertion.assertTrue(ck.isContentLoaded(), "Content is not loaded");
ck.clickPublishButton();
break;
case SRC:
SourceEditModePageObject src = openSrcModeWithMainEditButton();
src.verifySourceOnlyMode();
src.clickPublishButton();
break;
}
}
use of com.wikia.webdriver.pageobjectsfactory.pageobject.visualeditor.VisualEditorPageObject in project selenium-tests by Wikia.
the class VisualEditorInsertGalleryDialog method addExistingMedia.
public VisualEditorPageObject addExistingMedia(int number) {
waitForDialogVisible();
WebElement mediaResultsWidget = dialogBody.findElement(MEDIA_RESULTS_WIDGET_BY);
wait.forElementVisible(mediaResultsWidget);
List<WebElement> mediaResults = mediaResultsWidget.findElements(MEDIA_RESULTS_BY);
//only selects available number of media
for (int i = 0; i < Math.min(number, mediaResults.size()); i++) {
WebElement mediaAddIcon = mediaResults.get(i).findElement(MEDIA_ADD_ICON_BY);
mediaAddIcon.click();
}
clickAddGalleryButton();
return new VisualEditorPageObject();
}
use of com.wikia.webdriver.pageobjectsfactory.pageobject.visualeditor.VisualEditorPageObject in project selenium-tests by Wikia.
the class VisualEditorInsertGalleryDialog method clickTitleToPreview.
public VisualEditorPageObject clickTitleToPreview(int index) {
waitForDialogVisible();
WebElement mediaResultsWidget = dialogBody.findElement(MEDIA_RESULTS_WIDGET_BY);
wait.forElementVisible(mediaResultsWidget);
WebElement targetMedia = mediaResultsWidget.findElements(MEDIA_TITLES_BY).get(index);
scrollAndClick(targetMedia);
return new VisualEditorPageObject();
}
use of com.wikia.webdriver.pageobjectsfactory.pageobject.visualeditor.VisualEditorPageObject in project selenium-tests by Wikia.
the class VisualEditorAddMediaDialog method previewExistingVideoByTitle.
public VisualEditorPageObject previewExistingVideoByTitle(String title) {
waitForDialogVisible();
WebElement media = findMediaByTitle(title);
media.findElement(previewVideoButtonBy).click();
PageObjectLogging.log("previewExistingMediaByTitle", "Media clicked", true);
return new VisualEditorPageObject();
}
Aggregations