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, 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; } }); }
@Override public Object lookup(ArquillianResource resource, Annotation... qualifiers) { final M base = base(qualifiers); return generateProxy(base); }
public <T extends SelfAwareFragment> T getResource(Class<T> fragment) { return PageFragmentEnricher.createPageFragment(fragment, resource); } }
@Override public void enrich(SearchContext searchContext, Object target) { List<Field> fields = ReflectionHelper.getFields(target.getClass()); for (Field field : fields) { checkFieldValidity(searchContext, target, field); } }
@Override public void enrich(Object o) { Collection<SearchContextTestEnricher> sortedSearchContextEnrichers = AbstractSearchContextEnricher.getSortedSearchContextEnrichers(serviceLoader); for (SearchContextTestEnricher enricher : sortedSearchContextEnrichers) { if (isApplicableToTestClass(enricher)) { enricher.enrich(null, o); } } }
public static WebElement findElementLazily(GrapheneContext context, final By by, final GrapheneProxy.FutureTarget searchContextFuture, final int indexInList) { return findElement(context, new GrapheneProxy.FutureTarget() { @Override public Object getTarget() { List<WebElement> elements = dropProxyAndFindElements(by, (SearchContext) searchContextFuture.getTarget()); if (elements.size() > indexInList) { return elements.get(indexInList); } return null; } }); }
/** * Checks if some annotation is present in the given array of annotations * * @param annotations - array of annotations * @param needle - annotation we are looking for * @return if the annotation is present an the given array of annotations */ private static boolean isAnnotationPresent(final Annotation[] annotations, final Class<? extends Annotation> needle) { return findAnnotation(annotations, needle) != null; }
<T> T imposterise(MethodInterceptor interceptor, Class<T> mockedType, Class<?>... ancillaryTypes) { return INSTANCE.imposteriseProtected(interceptor, mockedType, ancillaryTypes); } }
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; } }); }
@Override public <T> T getContent(Class<T> clazz) { return PageFragmentEnricher.createPageFragment(clazz, root); }
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; } }); }
@Override public void enrich(SearchContext searchContext, Object target) { List<Field> fields = ReflectionHelper.getFields(target.getClass()); for (Field field : fields) { checkFieldValidity(searchContext, target, field); } }
@Override public Object lookup(ArquillianResource resource, Annotation... qualifiers) { final M base = base(qualifiers); return generateProxy(base); }
@Override public void enrich(Object o) { Collection<SearchContextTestEnricher> sortedSearchContextEnrichers = AbstractSearchContextEnricher.getSortedSearchContextEnrichers(serviceLoader); for (SearchContextTestEnricher enricher : sortedSearchContextEnrichers) { if (isApplicableToTestClass(enricher)) { enricher.enrich(null, o); } } }
public static WebElement findElementLazily(GrapheneContext context, final By by, final GrapheneProxy.FutureTarget searchContextFuture, final int indexInList) { return findElement(context, new GrapheneProxy.FutureTarget() { @Override public Object getTarget() { List<WebElement> elements = dropProxyAndFindElements(by, (SearchContext) searchContextFuture.getTarget()); if (elements.size() > indexInList) { return elements.get(indexInList); } return null; } }); }
/** * Checks if some annotation is present in the given array of annotations * * @param annotations - array of annotations * @param needle - annotation we are looking for * @return if the annotation is present an the given array of annotations */ private static boolean isAnnotationPresent(final Annotation[] annotations, final Class<? extends Annotation> needle) { return findAnnotation(annotations, needle) != null; }
<T> T imposterise(MethodInterceptor interceptor, Class<T> mockedType, Class<?>... ancillaryTypes) { return INSTANCE.imposteriseProtected(interceptor, mockedType, ancillaryTypes); } }
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) { 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); } } }); }