private List<WebElementFacade> webElementFacadesFrom(List<WebElement> nestedElements) { List<WebElementFacade> results = Lists.newArrayList(); for (WebElement element : nestedElements) { results.add( wrapWebElement( driver, element, timeoutInMilliseconds(), waitForTimeoutInMilliseconds, element.toString())); } return results; }
public static <T extends WebElementFacade> T wrapWebElement( final WebDriver driver, final WebElement element, final long timeout) { return (T) new WebElementFacadeImpl(driver, null, element, timeout, timeout) .foundBy(element.toString()); }