Example usage for org.openqa.selenium.support.ui ExpectedConditions presenceOfNestedElementLocatedBy

List of usage examples for org.openqa.selenium.support.ui ExpectedConditions presenceOfNestedElementLocatedBy

Introduction

In this page you can find the example usage for org.openqa.selenium.support.ui ExpectedConditions presenceOfNestedElementLocatedBy.

Prototype

public static ExpectedCondition<WebElement> presenceOfNestedElementLocatedBy(final WebElement element,
        final By childLocator) 

Source Link

Document

An expectation for checking child WebElement as a part of parent element to be present

Usage

From source file:de.knowwe.uitest.PanelUITest.java

License:Open Source License

protected void addWatchDummy() throws InterruptedException {
    getRightPanel().findElement(By.className("addwatch")).click();
    new WebDriverWait(getDriver(), 10).until(
            ExpectedConditions.presenceOfNestedElementLocatedBy(getRightPanel(), By.tagName("textarea")));
    getRightPanel().findElement(By.tagName("textarea")).sendKeys("Test");
    getRightPanel().findElement(By.tagName("textarea")).sendKeys(Keys.ENTER);
}