public class ComponentsManager extends AbstractComponentInstantiator implements ComponentInstantiator, ComponentsAccessor, ProxyElementListener
A component is an Object implementing no particular interface, but capable a wrapping
a WebElement.
FluentWebElement is the most common component.
| Constructor and Description |
|---|
ComponentsManager(FluentControl control)
Creates a new components manager.
|
| Modifier and Type | Method and Description |
|---|---|
<L extends List<T>,T> |
asComponentList(Class<L> listClass,
Class<T> componentClass,
Iterable<org.openqa.selenium.WebElement> elementList)
Create and register a new list of component from the given element iterable.
|
Set<Object> |
getComponents(org.openqa.selenium.WebElement element)
Get the related components from the given element.
|
ComponentInstantiator |
getInstantiator()
Get the component instantiator used by this components manager.
|
boolean |
isComponentClass(Class<?> componentClass)
Check if this class is a component class.
|
boolean |
isComponentListClass(Class<? extends List<?>> componentListClass)
Check if this class is a component list class.
|
<T> T |
newComponent(Class<T> componentClass,
org.openqa.selenium.WebElement element)
Create and register a new component from the given element.
|
<L extends List<T>,T> |
newComponentList(Class<L> listClass,
Class<T> componentClass,
List<T> componentsList)
Create and register a new list of component from the given component list.
|
void |
proxyElementFound(Object proxy,
org.openqa.selenium.support.pagefactory.ElementLocator locator,
List<org.openqa.selenium.WebElement> elements)
Invoked when proxy element search is over and elements were found.
|
void |
proxyElementSearch(Object proxy,
org.openqa.selenium.support.pagefactory.ElementLocator locator)
Invoked when proxy element search is starting.
|
void |
release()
Release this manager.
|
asComponentList, asComponentList, asComponentList, asComponentList, asComponentList, asFluentList, asFluentList, asFluentList, asFluentList, asFluentList, asFluentList, newComponentList, newComponentList, newComponentList, newComponentList, newComponentList, newFluent, newFluentList, newFluentList, newFluentList, newFluentList, newFluentList, newFluentListclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitasComponentList, asComponentList, asComponentList, asComponentList, asComponentList, asFluentList, asFluentList, asFluentList, asFluentList, asFluentList, asFluentList, newComponentList, newComponentList, newComponentList, newComponentList, newComponentList, newFluent, newFluentList, newFluentList, newFluentList, newFluentList, newFluentList, newFluentListpublic ComponentsManager(FluentControl control)
control - control interfacepublic ComponentInstantiator getInstantiator()
public Set<Object> getComponents(org.openqa.selenium.WebElement element)
ComponentsAccessorgetComponents in interface ComponentsAccessorelement - selenium elementpublic boolean isComponentClass(Class<?> componentClass)
ComponentInstantiatorisComponentClass in interface ComponentInstantiatorcomponentClass - class to checkpublic boolean isComponentListClass(Class<? extends List<?>> componentListClass)
ComponentInstantiatorisComponentListClass in interface ComponentInstantiatorcomponentListClass - class to checkpublic <T> T newComponent(Class<T> componentClass, org.openqa.selenium.WebElement element)
ComponentInstantiatornewComponent in interface ComponentInstantiatorT - type of the componentcomponentClass - type of the componentelement - wrapped elementpublic <L extends List<T>,T> L newComponentList(Class<L> listClass, Class<T> componentClass, List<T> componentsList)
ComponentInstantiatornewComponentList in interface ComponentInstantiatorL - type of the listT - type of the componentlistClass - type of the listcomponentClass - type of the componentcomponentsList - components listpublic <L extends List<T>,T> L asComponentList(Class<L> listClass, Class<T> componentClass, Iterable<org.openqa.selenium.WebElement> elementList)
ComponentInstantiatorasComponentList in interface ComponentInstantiatorasComponentList in class AbstractComponentInstantiatorL - type of the listT - type of the componentlistClass - type of the listcomponentClass - type of the componentelementList - elementspublic void proxyElementSearch(Object proxy, org.openqa.selenium.support.pagefactory.ElementLocator locator)
ProxyElementListenerproxyElementSearch in interface ProxyElementListenerproxy - proxylocator - element locatorpublic void proxyElementFound(Object proxy, org.openqa.selenium.support.pagefactory.ElementLocator locator, List<org.openqa.selenium.WebElement> elements)
ProxyElementListenerproxyElementFound in interface ProxyElementListenerproxy - proxylocator - element locatorelements - found elementspublic void release()
Copyright © 2016 FluentLenium. All Rights Reserved.