use of org.openqa.selenium.NoSuchElementException in project selenium-tests by Wikia.
the class TableBuilderComponentObject method selectAlignment.
public void selectAlignment(Alignment position) {
wait.forElementVisible(tablePropertiesDropdownOptions.get(1));
Select positionDropdown = new Select(tablePropertiesDropdownOptions.get(1));
switch(position) {
case LEFT:
positionDropdown.selectByVisibleText(position.getAlignment());
break;
case CENTER:
positionDropdown.selectByVisibleText(position.getAlignment());
break;
case RIGHT:
positionDropdown.selectByVisibleText(position.getAlignment());
break;
default:
throw new NoSuchElementException("Non-existing alignment selected");
}
PageObjectLogging.log("selectPosition", position.getAlignment() + " position selected", true, driver);
}
use of org.openqa.selenium.NoSuchElementException in project selenium-tests by Wikia.
the class ArticlePageObject method verifyURLActionEditEditor.
public void verifyURLActionEditEditor(Editor expectedEditor, String articleName, String wikiURL) {
switch(expectedEditor) {
case CK:
VisualEditModePageObject ck = navigateToArticleEditPage(wikiURL, articleName);
Assertion.assertTrue(ck.isContentLoaded(), "Content is not loaded");
ck.clickPublishButton();
break;
case SRC:
SourceEditModePageObject src = navigateToArticleEditPageSrc(wikiURL, articleName);
src.verifySourceOnlyMode();
src.clickPublishButton();
break;
default:
throw new NoSuchElementException("Invalid expected editor chosen: " + expectedEditor.name());
}
}
Aggregations