List of usage examples for org.openqa.selenium.support.pagefactory.internal LocatingElementListHandler LocatingElementListHandler
public LocatingElementListHandler(ElementLocator locator)
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; }