Example usage for org.openqa.selenium.support.pagefactory AjaxElementLocator findElement

List of usage examples for org.openqa.selenium.support.pagefactory AjaxElementLocator findElement

Introduction

In this page you can find the example usage for org.openqa.selenium.support.pagefactory AjaxElementLocator findElement.

Prototype

@Override
public WebElement findElement() 

Source Link

Document

Will poll the interface on a regular basis until the element is present.

Usage

From source file:com.surevine.alfresco.space.webdriver.DocumentLibraryPage.java

License:Open Source License

public WebElement getDocumentLink(String string) {
    Field f = null;//  ww w.  jav  a  2s  . c om
    try {
        f = DocumentLibraryPage.class.getDeclaredField("docLink");
    } catch (SecurityException e) {
        // TODO Auto-generated catch block
        e.printStackTrace();
    } catch (NoSuchFieldException e) {
        // TODO Auto-generated catch block
        e.printStackTrace();
    }
    AjaxElementLocator ael = new AjaxElementLocator(driver, f, 15);

    return (ael.findElement());
}