protected final void setupPageFragment(SearchContext searchContext, Object target, Field field) { GrapheneContext grapheneContext = ((GrapheneProxyInstance) searchContext).getGrapheneContext(); // the by retrieved in this way is never null, by default it is ByIdOrName using field name By rootBy = FindByUtilities.getCorrectBy(field, configuration.get().getDefaultElementLocatingStrategy()); WebElement root = WebElementUtils.findElementLazily(rootBy, searchContext); Object pageFragment = createPageFragment(field.getType(), root); setValue(field, target, pageFragment); }
protected final void setupPageFragment(SearchContext searchContext, Object target, Field field) { GrapheneContext grapheneContext = ((GrapheneProxyInstance) searchContext).getGrapheneContext(); // the by retrieved in this way is never null, by default it is ByIdOrName using field name By rootBy = FindByUtilities.getCorrectBy(field, configuration.get().getDefaultElementLocatingStrategy()); WebElement root = WebElementUtils.findElementLazily(rootBy, searchContext); Object pageFragment = createPageFragment(field.getType(), root); setValue(field, target, pageFragment); }
protected final void setupPageFragmentList(SearchContext searchContext, Object target, Field field) throws ClassNotFoundException { GrapheneContext grapheneContext = ((GrapheneProxyInstance) searchContext).getGrapheneContext(); // the by retrieved in this way is never null, by default it is ByIdOrName using field name By rootBy = FindByUtilities.getCorrectBy(field, configuration.get().getDefaultElementLocatingStrategy()); List<?> pageFragments = createPageFragmentList(getListType(field), searchContext, rootBy); setValue(field, target, pageFragments); }
protected final void setupPageFragmentList(SearchContext searchContext, Object target, Field field) throws ClassNotFoundException { GrapheneContext grapheneContext = ((GrapheneProxyInstance) searchContext).getGrapheneContext(); // the by retrieved in this way is never null, by default it is ByIdOrName using field name By rootBy = FindByUtilities.getCorrectBy(field, configuration.get().getDefaultElementLocatingStrategy()); List<?> pageFragments = createPageFragmentList(getListType(field), searchContext, rootBy); setValue(field, target, pageFragments); }
setValue(roots.get(0), pageFragment, root);
setValue(roots.get(0), pageFragment, root);