Package org.fluentlenium.core.components
Interface ComponentInstantiator
-
- All Known Subinterfaces:
FluentControl
,FluentPageControl
,IFluentAdapter
- All Known Implementing Classes:
AbstractComponentInstantiator
,BaseFluentHook
,BaseHook
,ComponentsManager
,ContainerFluentControl
,DefaultComponentInstantiator
,DefaultFluentContainer
,FluentAdapter
,FluentControlImpl
,FluentDriver
,FluentPage
,FluentStandalone
,FluentStandaloneRunnable
,FluentTestRunnerAdapter
,FluentWebElement
,IsolatedTest
,WaitHook
public interface ComponentInstantiator
Factory building new components.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description <L extends List<T>,T>
LasComponentList(Class<L> listClass, Class<T> componentClass, Iterable<org.openqa.selenium.WebElement> elements)
Create and register a new list of component from the given element iterable.<L extends List<T>,T>
LasComponentList(Class<L> listClass, Class<T> componentClass, List<org.openqa.selenium.WebElement> elements)
Create and register a new list of component from the given element iterable.<L extends List<T>,T>
LasComponentList(Class<L> listClass, Class<T> componentClass, org.openqa.selenium.WebElement... elements)
Create and register a new list of component from the given element iterable.<T> ComponentList
asComponentList(Class<T> componentClass, Iterable<org.openqa.selenium.WebElement> elements)
Create and register a new list of component from the given element iterable.<T> ComponentList<T>
asComponentList(Class<T> componentClass, List<org.openqa.selenium.WebElement> elements)
Create and register a new list of component from the given element iterable.<T> ComponentList<T>
asComponentList(Class<T> componentClass, org.openqa.selenium.WebElement... elements)
Create and register a new list of component from the given element iterable.<T extends FluentWebElement>
FluentList<T>asFluentList(Class<T> componentClass, Iterable<org.openqa.selenium.WebElement> elements)
Create and register a new fluent list.<T extends FluentWebElement>
FluentList<T>asFluentList(Class<T> componentClass, List<org.openqa.selenium.WebElement> elements)
Create and register a new fluent list.<T extends FluentWebElement>
FluentList<T>asFluentList(Class<T> componentClass, org.openqa.selenium.WebElement... elements)
Create and register a new fluent list.FluentList<FluentWebElement>
asFluentList(Iterable<org.openqa.selenium.WebElement> elements)
Create and register a new fluent list from the argument collection of WebElements.FluentList<FluentWebElement>
asFluentList(List<org.openqa.selenium.WebElement> elements)
Create and register a new fluent list from the argument list of WebElements.FluentList<FluentWebElement>
asFluentList(org.openqa.selenium.WebElement... elements)
Create and register a new fluent list from the argument WebElements.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 of the provided type from the givenWebElement
.<L extends List<T>,T>
LnewComponentList(Class<L> listClass, Class<T> componentClass)
Create and register an empty list of component.<L extends List<T>,T>
LnewComponentList(Class<L> listClass, Class<T> componentClass, List<T> componentsList)
Create and register a new list of component from the given component list.<L extends List<T>,T>
LnewComponentList(Class<L> listClass, Class<T> componentClass, T... componentsList)
Create and register a new list of component from the given component list.<T> ComponentList<T>
newComponentList(Class<T> componentClass)
Create and register an empty list of component.<T> ComponentList<T>
newComponentList(Class<T> componentClass, List<T> componentsList)
Create and register a new list of component from the given component list.<T> ComponentList<T>
newComponentList(Class<T> componentClass, T... componentsList)
Create and register a new list of component from the given component list.FluentWebElement
newFluent(org.openqa.selenium.WebElement element)
Create and register a newFluentWebElement
from the givenWebElement
.FluentList<FluentWebElement>
newFluentList()
Create and register an empty fluent list.<T extends FluentWebElement>
FluentList<T>newFluentList(Class<T> componentClass)
Create and register an empty fluent list of the provided type.<T extends FluentWebElement>
FluentList<T>newFluentList(Class<T> componentClass, List<T> elements)
Create and register a new fluent list.<T extends FluentWebElement>
FluentList<T>newFluentList(Class<T> componentClass, T... elements)
Create and register a new fluent list.FluentList<FluentWebElement>
newFluentList(List<FluentWebElement> elements)
Create and register a new fluent list from the argument list of FluentWebElements.FluentList<FluentWebElement>
newFluentList(FluentWebElement... elements)
Create and register a new fluent list from the argument FluentWebElements.
-
-
-
Method Detail
-
newFluent
FluentWebElement newFluent(org.openqa.selenium.WebElement element)
Create and register a newFluentWebElement
from the givenWebElement
.- Parameters:
element
- wrapped element- Returns:
- new instance of the component
-
newComponent
<T> T newComponent(Class<T> componentClass, org.openqa.selenium.WebElement element)
Create and register a new component of the provided type from the givenWebElement
.- Type Parameters:
T
- type of the component- Parameters:
componentClass
- type of the componentelement
- wrapped element- Returns:
- new instance of the component
-
newFluentList
FluentList<FluentWebElement> newFluentList()
Create and register an empty fluent list.- Returns:
- new list of fluent web element
-
newFluentList
FluentList<FluentWebElement> newFluentList(FluentWebElement... elements)
Create and register a new fluent list from the argument FluentWebElements.- Parameters:
elements
- list of elements- Returns:
- new list of fluent web element
-
newFluentList
FluentList<FluentWebElement> newFluentList(List<FluentWebElement> elements)
Create and register a new fluent list from the argument list of FluentWebElements.- Parameters:
elements
- list of elements- Returns:
- new list of fluent web element
-
asFluentList
FluentList<FluentWebElement> asFluentList(org.openqa.selenium.WebElement... elements)
Create and register a new fluent list from the argument WebElements.- Parameters:
elements
- list of elements- Returns:
- new list of fluent web element
-
asFluentList
FluentList<FluentWebElement> asFluentList(Iterable<org.openqa.selenium.WebElement> elements)
Create and register a new fluent list from the argument collection of WebElements.- Parameters:
elements
- list of elements- Returns:
- new list of fluent web element
-
asFluentList
FluentList<FluentWebElement> asFluentList(List<org.openqa.selenium.WebElement> elements)
Create and register a new fluent list from the argument list of WebElements.- Parameters:
elements
- list of elements- Returns:
- new list of fluent web element
-
newFluentList
<T extends FluentWebElement> FluentList<T> newFluentList(Class<T> componentClass)
Create and register an empty fluent list of the provided type.- Type Parameters:
T
- type of the component- Parameters:
componentClass
- class of the component- Returns:
- new list of fluent web element
-
newFluentList
<T extends FluentWebElement> FluentList<T> newFluentList(Class<T> componentClass, T... elements)
Create and register a new fluent list.- Type Parameters:
T
- type of the component- Parameters:
componentClass
- class of the componentelements
- list of elements- Returns:
- new list of fluent web element
-
newFluentList
<T extends FluentWebElement> FluentList<T> newFluentList(Class<T> componentClass, List<T> elements)
Create and register a new fluent list.- Type Parameters:
T
- type of the component- Parameters:
componentClass
- class of the componentelements
- list of elements- Returns:
- new list of fluent web element
-
asFluentList
<T extends FluentWebElement> FluentList<T> asFluentList(Class<T> componentClass, org.openqa.selenium.WebElement... elements)
Create and register a new fluent list.- Type Parameters:
T
- type of the component- Parameters:
componentClass
- class of the componentelements
- list of elements- Returns:
- new list of fluent web element
-
asFluentList
<T extends FluentWebElement> FluentList<T> asFluentList(Class<T> componentClass, Iterable<org.openqa.selenium.WebElement> elements)
Create and register a new fluent list.- Type Parameters:
T
- type of the component- Parameters:
componentClass
- class of the componentelements
- list of elements- Returns:
- new list of fluent web element
-
asFluentList
<T extends FluentWebElement> FluentList<T> asFluentList(Class<T> componentClass, List<org.openqa.selenium.WebElement> elements)
Create and register a new fluent list.- Type Parameters:
T
- type of the component- Parameters:
componentClass
- class of the componentelements
- list of elements- Returns:
- new list of fluent web element
-
newComponentList
<T> ComponentList<T> newComponentList(Class<T> componentClass)
Create and register an empty list of component.- Type Parameters:
T
- type of the component- Parameters:
componentClass
- type of the component- Returns:
- new list of components
-
asComponentList
<T> ComponentList<T> asComponentList(Class<T> componentClass, org.openqa.selenium.WebElement... elements)
Create and register a new list of component from the given element iterable.- Type Parameters:
T
- type of the component- Parameters:
componentClass
- type of the componentelements
- elements- Returns:
- new list of components
-
asComponentList
<T> ComponentList asComponentList(Class<T> componentClass, Iterable<org.openqa.selenium.WebElement> elements)
Create and register a new list of component from the given element iterable.- Type Parameters:
T
- type of the component- Parameters:
componentClass
- type of the componentelements
- elements- Returns:
- new list of components
-
asComponentList
<T> ComponentList<T> asComponentList(Class<T> componentClass, List<org.openqa.selenium.WebElement> elements)
Create and register a new list of component from the given element iterable.- Type Parameters:
T
- type of the component- Parameters:
componentClass
- type of the componentelements
- elements- Returns:
- new list of components
-
newComponentList
<T> ComponentList<T> newComponentList(Class<T> componentClass, T... componentsList)
Create and register a new list of component from the given component list.- Type Parameters:
T
- type of the component- Parameters:
componentClass
- type of the componentcomponentsList
- components list- Returns:
- new list of components
-
newComponentList
<T> ComponentList<T> newComponentList(Class<T> componentClass, List<T> componentsList)
Create and register a new list of component from the given component list.- Type Parameters:
T
- type of the component- Parameters:
componentClass
- type of the componentcomponentsList
- components list- Returns:
- new list of components
-
newComponentList
<L extends List<T>,T> L newComponentList(Class<L> listClass, Class<T> componentClass)
Create and register an empty list of component.- Type Parameters:
L
- type of the listT
- type of the component- Parameters:
listClass
- type of the listcomponentClass
- type of the component- Returns:
- new list of components
-
asComponentList
<L extends List<T>,T> L asComponentList(Class<L> listClass, Class<T> componentClass, org.openqa.selenium.WebElement... elements)
Create and register a new list of component from the given element iterable.- Type Parameters:
L
- type of the listT
- type of the component- Parameters:
listClass
- type of the listcomponentClass
- type of the componentelements
- elements- Returns:
- new list of components
-
asComponentList
<L extends List<T>,T> L asComponentList(Class<L> listClass, Class<T> componentClass, Iterable<org.openqa.selenium.WebElement> elements)
Create and register a new list of component from the given element iterable.- Type Parameters:
L
- type of the listT
- type of the component- Parameters:
listClass
- type of the listcomponentClass
- type of the componentelements
- elements- Returns:
- new list of components
-
asComponentList
<L extends List<T>,T> L asComponentList(Class<L> listClass, Class<T> componentClass, List<org.openqa.selenium.WebElement> elements)
Create and register a new list of component from the given element iterable.- Type Parameters:
L
- type of the listT
- type of the component- Parameters:
listClass
- type of the listcomponentClass
- type of the componentelements
- elements- Returns:
- new list of components
-
newComponentList
<L extends List<T>,T> L newComponentList(Class<L> listClass, Class<T> componentClass, T... componentsList)
Create and register a new list of component from the given component list.- Type Parameters:
L
- type of the listT
- type of the component- Parameters:
listClass
- type of the listcomponentClass
- type of the componentcomponentsList
- components list- Returns:
- new list of components
-
newComponentList
<L extends List<T>,T> L newComponentList(Class<L> listClass, Class<T> componentClass, List<T> componentsList)
Create and register a new list of component from the given component list.- Type Parameters:
L
- type of the listT
- type of the component- Parameters:
listClass
- type of the listcomponentClass
- type of the componentcomponentsList
- components list- Returns:
- new list of components
-
isComponentClass
boolean isComponentClass(Class<?> componentClass)
Check if this class is a component class.- Parameters:
componentClass
- class to check- Returns:
- true if this class is a component class, false otherwise
-
-