public static WebElement findElementLazily(final By by, final SearchContext searchContext, final int indexInList) { return findElement(getContext(searchContext), new GrapheneProxy.FutureTarget() { @Override public Object getTarget() { List<WebElement> elements = dropProxyAndFindElements(by, searchContext); if (elements.size() > indexInList) { return elements.get(indexInList); } return null; } }); }
public static List<WebElement> findElementsLazily(final By by, final SearchContext searchContext) { return findElementsLazily(getContext(searchContext), by, new GrapheneProxy.FutureTarget() { @Override public Object getTarget() { return searchContext; } }); }
public static List<WebElement> findElementsLazily(final By by, final SearchContext searchContext) { return findElementsLazily(getContext(searchContext), by, new GrapheneProxy.FutureTarget() { @Override public Object getTarget() { return searchContext; } }); }
public static WebElement findElementLazily(final By by, final SearchContext searchContext) { return findElement(getContext(searchContext), new GrapheneProxy.FutureTarget() { @Override public Object getTarget() { try { return dropProxyAndFindElement(by, searchContext); } catch (NoSuchElementException ex) { throw new NoSuchElementException((by instanceof ByIdOrName ? EMPTY_FIND_BY_WARNING : "") + ex.getMessage(), ex); } } }); }
public static WebElement findElementLazily(final By by, final SearchContext searchContext, final int indexInList) { return findElement(getContext(searchContext), new GrapheneProxy.FutureTarget() { @Override public Object getTarget() { List<WebElement> elements = dropProxyAndFindElements(by, searchContext); if (elements.size() > indexInList) { return elements.get(indexInList); } return null; } }); }
public static WebElement findElementLazily(final By by, final SearchContext searchContext) { return findElement(getContext(searchContext), new GrapheneProxy.FutureTarget() { @Override public Object getTarget() { try { return dropProxyAndFindElement(by, searchContext); } catch (NoSuchElementException ex) { throw new NoSuchElementException((by instanceof ByIdOrName ? EMPTY_FIND_BY_WARNING : "") + ex.getMessage(), ex); } } }); }