@Override public Object getTarget() { List<WebElement> result = new ArrayList<WebElement>(); List<WebElement> elements = dropProxyAndFindElements(by, (SearchContext) searchContextFuture.getTarget()); if ((by instanceof ByIdOrName) && (elements.isEmpty())) { LOGGER.log(Level.WARNING, EMPTY_FIND_BY_WARNING); } for (int i = 0; i < elements.size(); i++) { WebElement foundElement = findElementLazily(context, by, searchContextFuture, i); if (foundElement != null) { result.add(foundElement); } } return result; } }), List.class);
@Override public Object getTarget() { List<WebElement> result = new ArrayList<WebElement>(); List<WebElement> elements = dropProxyAndFindElements(by, (SearchContext) searchContextFuture.getTarget()); if ((by instanceof ByIdOrName) && (elements.isEmpty())) { LOGGER.log(Level.WARNING, EMPTY_FIND_BY_WARNING); } for (int i = 0; i < elements.size(); i++) { WebElement foundElement = findElementLazily(context, by, searchContextFuture, i); if (foundElement != null) { result.add(foundElement); } } return result; } }), List.class);
@Override public Object invoke(Object proxy, Method method, Object[] args) throws Throwable { return method.invoke(TARGET.getTarget(), args); } }, FundamentalTestConfiguration.class);
/** * Computes the target for invocation - if future target is provided, it will be returned, othewise the target instance will * be returned. * * @return the real target for invocation */ protected Object getTarget() { return (future == null) ? target : future.getTarget(); }
@Override public Object getTarget() { List<WebElement> elements = dropProxyAndFindElements(by, (SearchContext) searchContextFuture.getTarget()); if (elements.size() > indexInList) { return elements.get(indexInList); } return null; } });
public static WebElement findElement(GrapheneContext context, final By by, final GrapheneProxy.FutureTarget searchContextFuture) { // Here the web element has to be found to ensure that SearchContext throws // NoSuchElementException if there is no element with the given By locator. dropProxyAndFindElement(by, (SearchContext) searchContextFuture.getTarget()); return findElement(context, new GrapheneProxy.FutureTarget() { @Override public Object getTarget() { return dropProxyAndFindElement(by, (SearchContext) searchContextFuture.getTarget()); } }); }
@Override public Object invoke(Object proxy, Method method, Object[] args) throws Throwable { return method.invoke(TARGET.getTarget(), args); } }, RichFacesPageFragmentsConfiguration.class);
@Override public Object getTarget() { return dropProxyAndFindElement(by, (SearchContext) searchContextFuture.getTarget()); } });
@Override public Object getTarget() { List<WebElement> elements = dropProxyAndFindElements(by, (SearchContext) searchContextFuture.getTarget()); if (elements.size() > indexInList) { return elements.get(indexInList); } return null; } });
@Override public Object getTarget() { return dropProxyAndFindElement(by, (SearchContext) searchContextFuture.getTarget()); } });
public static WebElement findElement(GrapheneContext context, final By by, final GrapheneProxy.FutureTarget searchContextFuture) { // Here the web element has to be found to ensure that SearchContext throws // NoSuchElementException if there is no element with the given By locator. dropProxyAndFindElement(by, (SearchContext) searchContextFuture.getTarget()); return findElement(context, new GrapheneProxy.FutureTarget() { @Override public Object getTarget() { return dropProxyAndFindElement(by, (SearchContext) searchContextFuture.getTarget()); } }); }
/** * Computes the target for invocation - if future target is provided, it will be returned, othewise the target instance will * be returned. * * @return the real target for invocation */ protected Object getTarget() { return (future == null) ? target : future.getTarget(); }