Search in sources :

Example 31 with NoSuchElementException

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);
}
Also used : Select(org.openqa.selenium.support.ui.Select) NoSuchElementException(org.openqa.selenium.NoSuchElementException)

Example 32 with NoSuchElementException

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());
    }
}
Also used : SourceEditModePageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.article.editmode.SourceEditModePageObject) VisualEditModePageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.article.editmode.VisualEditModePageObject) NoSuchElementException(org.openqa.selenium.NoSuchElementException)

Aggregations

NoSuchElementException (org.openqa.selenium.NoSuchElementException)32 WebElement (org.openqa.selenium.WebElement)18 AndroidElement (io.appium.java_client.android.AndroidElement)5 Select (org.openqa.selenium.support.ui.Select)5 ElementMenuOptions (com.owncloud.android.test.ui.models.ElementMenuOptions)4 WaitAMomentPopUp (com.owncloud.android.test.ui.models.WaitAMomentPopUp)3 Test (org.junit.Test)3 WebDriverWait (org.openqa.selenium.support.ui.WebDriverWait)3 PublicAtsApi (com.axway.ats.common.PublicAtsApi)2 SeleniumOperationException (com.axway.ats.uiengine.exceptions.SeleniumOperationException)2 RealHtmlElementState (com.axway.ats.uiengine.utilities.realbrowser.html.RealHtmlElementState)2 FailingTestCategory (com.owncloud.android.test.ui.groups.FailingTestCategory)2 InProgressCategory (com.owncloud.android.test.ui.groups.InProgressCategory)2 NoIgnoreTestCategory (com.owncloud.android.test.ui.groups.NoIgnoreTestCategory)2 SmokeTestCategory (com.owncloud.android.test.ui.groups.SmokeTestCategory)2 UnfinishedTestCategory (com.owncloud.android.test.ui.groups.UnfinishedTestCategory)2 FileListView (com.owncloud.android.test.ui.models.FileListView)2 ShareView (com.owncloud.android.test.ui.models.ShareView)2 VisualEditorPageObject (com.wikia.webdriver.pageobjectsfactory.pageobject.visualeditor.VisualEditorPageObject)2 Category (org.junit.experimental.categories.Category)2