Search in sources :

Example 86 with WebElement

use of org.openqa.selenium.WebElement in project selenium-tests by Wikia.

the class MiniEditorComponentObject method switchAndQuoteMessageWall.

public void switchAndQuoteMessageWall(String reply) {
    wait.forElementVisible(miniEditorWrapper);
    quoteMessageWallFrame = miniEditorWrapper.findElement(By.cssSelector(".cke_contents iframe"));
    driver.switchTo().frame(quoteMessageWallFrame);
    WebElement quoteMessageTextArea = driver.findElement(By.cssSelector("body#bodyContent"));
    quoteMessageTextArea.clear();
    quoteMessageTextArea.sendKeys(reply);
    PageObjectLogging.log("switchAndQuoteMessageWall", "quote typed", true);
}
Also used : WebElement(org.openqa.selenium.WebElement)

Example 87 with WebElement

use of org.openqa.selenium.WebElement in project selenium-tests by Wikia.

the class PhotoAddComponentObject method clickAddThisPhoto.

public PhotoOptionsComponentObject clickAddThisPhoto(int photoNumber) {
    WebElement photo = wait.forElementVisible(addThisPhotoList.get(photoNumber));
    photoName = addThisPhotoList.get(photoNumber).findElement(By.cssSelector("img")).getAttribute("data-image-name");
    scrollAndClick(photo);
    PageObjectLogging.log("clickAddPhoto", "add photo button clicked", true);
    return new PhotoOptionsComponentObject(driver);
}
Also used : WebElement(org.openqa.selenium.WebElement)

Example 88 with WebElement

use of org.openqa.selenium.WebElement in project selenium-tests by Wikia.

the class VisualEditorInsertGalleryDialog method removeMediaFromCart.

public void removeMediaFromCart(int number) {
    waitForDialogVisible();
    WebElement mediaResultsWidget = dialogBody.findElement(MEDIA_RESULTS_WIDGET_BY);
    wait.forElementVisible(mediaResultsWidget);
    List<WebElement> mediaResults = mediaResultsWidget.findElements(MEDIA_CHECKED_ICON_BY);
    for (int i = 0; i < number; i++) {
        mediaResults.get(i).click();
    }
}
Also used : WebElement(org.openqa.selenium.WebElement)

Example 89 with WebElement

use of org.openqa.selenium.WebElement in project selenium-tests by Wikia.

the class VisualEditorInsertGalleryDialog method clickMetaDataToPreview.

public VisualEditorPageObject clickMetaDataToPreview(int index) {
    waitForDialogVisible();
    WebElement mediaResultsWidget = dialogBody.findElement(MEDIA_RESULTS_WIDGET_BY);
    wait.forElementVisible(mediaResultsWidget);
    WebElement targetMedia = mediaResultsWidget.findElements(MEDIA_META_BY).get(index);
    scrollAndClick(targetMedia);
    return new VisualEditorPageObject();
}
Also used : VisualEditorPageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.visualeditor.VisualEditorPageObject) WebElement(org.openqa.selenium.WebElement)

Example 90 with WebElement

use of org.openqa.selenium.WebElement in project selenium-tests by Wikia.

the class VisualEditorInsertGalleryDialog method addMediaToCart.

public void addMediaToCart(int number) {
    waitForDialogVisible();
    WebElement mediaResultsWidget = dialogBody.findElement(MEDIA_RESULTS_WIDGET_BY);
    wait.forElementVisible(mediaResultsWidget);
    List<WebElement> mediaResults = mediaResultsWidget.findElements(MEDIA_ADD_ICON_BY);
    for (int i = 0; i < number; i++) {
        mediaResults.get(i).click();
    }
}
Also used : WebElement(org.openqa.selenium.WebElement)

Aggregations

WebElement (org.openqa.selenium.WebElement)520 Test (org.junit.Test)96 WebDriver (org.openqa.selenium.WebDriver)85 PublicAtsApi (com.axway.ats.common.PublicAtsApi)57 Actions (org.openqa.selenium.interactions.Actions)55 FirefoxDriver (org.openqa.selenium.firefox.FirefoxDriver)46 WebDriverWait (org.openqa.selenium.support.ui.WebDriverWait)40 By (org.openqa.selenium.By)36 URL (java.net.URL)35 RunAsClient (org.jboss.arquillian.container.test.api.RunAsClient)34 RealHtmlElementState (com.axway.ats.uiengine.utilities.realbrowser.html.RealHtmlElementState)30 JavascriptExecutor (org.openqa.selenium.JavascriptExecutor)21 NoSuchElementException (org.openqa.selenium.NoSuchElementException)21 HiddenHtmlElementState (com.axway.ats.uiengine.utilities.hiddenbrowser.HiddenHtmlElementState)19 ArrayList (java.util.ArrayList)18 SeleniumOperationException (com.axway.ats.uiengine.exceptions.SeleniumOperationException)13 Select (org.openqa.selenium.support.ui.Select)13 TimeoutException (org.openqa.selenium.TimeoutException)12 VisualEditorPageObject (com.wikia.webdriver.pageobjectsfactory.pageobject.visualeditor.VisualEditorPageObject)11 List (java.util.List)10