Example usage for org.openqa.selenium.support.pagefactory.internal LocatingElementListHandler LocatingElementListHandler

List of usage examples for org.openqa.selenium.support.pagefactory.internal LocatingElementListHandler LocatingElementListHandler

Introduction

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

Prototype

public LocatingElementListHandler(ElementLocator locator) 

Source Link

Usage

From source file:com.cognifide.qa.bb.scope.current.CurrentScopeListProvider.java

License:Apache License

@SuppressWarnings("unchecked")
private List<WebElement> retrieveListFromFactory(ElementLocatorFactory factory) {
    InvocationHandler handler = new LocatingElementListHandler(
            ((ScopedElementLocatorFactory) factory).getCurrentScope());
    return (List<WebElement>) Proxy.newProxyInstance(WebElement.class.getClassLoader(),
            new Class[] { List.class }, handler);
}

From source file:com.oracle.pgbu.common.pagefactory.DefaultFieldDecorator.java

License:Apache License

@SuppressWarnings("unchecked")
protected List<WebElement> proxyForListLocator(ClassLoader loader, ElementLocator locator) {
    InvocationHandler handler = new LocatingElementListHandler(locator);

    List<WebElement> proxy;
    proxy = (List<WebElement>) Proxy.newProxyInstance(loader, new Class[] { List.class }, handler);
    return proxy;
}