Package org.fluentlenium.core
Class FluentDriver
- java.lang.Object
-
- org.fluentlenium.core.FluentControlImpl
-
- org.fluentlenium.core.FluentDriver
-
- All Implemented Interfaces:
Configuration
,ConfigurationMutator
,ConfigurationProperties
,InputControl
,AlertControl
,CapabilitiesControl
,ComponentInstantiator
,CssControl
,EventsControl
,FluentControl
,FluentInjectControl
,NavigationControl
,PerformanceTimingControl
,JavascriptControl
,SearchControl<FluentWebElement>
,SeleniumDriverControl
,SnapshotControl
,AwaitControl
public class FluentDriver extends FluentControlImpl
Offers some shortcut to WebDriver methods using a wrappedWebDriver
instance. It provides methods to work with mouse, keyboard and windows.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.fluentlenium.configuration.ConfigurationProperties
ConfigurationProperties.DriverLifecycle, ConfigurationProperties.TriggerMode
-
-
Constructor Summary
Constructors Constructor Description FluentDriver(org.openqa.selenium.WebDriver driver, Configuration configuration, FluentControl adapter)
Wrap the driver into a Fluent driver.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description FluentList<FluentWebElement>
$(java.util.List<org.openqa.selenium.WebElement> rawElements)
Wrap raw selenium elements into a list of elements.Alert
alert()
Get an object to control the alert window.<L extends java.util.List<T>,T>
LasComponentList(java.lang.Class<L> listClass, java.lang.Class<T> componentClass, java.lang.Iterable<org.openqa.selenium.WebElement> elements)
Create and register a new list of component from the given element iterable.<L extends java.util.List<T>,T>
LasComponentList(java.lang.Class<L> listClass, java.lang.Class<T> componentClass, java.util.List<org.openqa.selenium.WebElement> elements)
Create and register a new list of component from the given element iterable.<L extends java.util.List<T>,T>
LasComponentList(java.lang.Class<L> listClass, java.lang.Class<T> componentClass, org.openqa.selenium.WebElement... elements)
Create and register a new list of component from the given element iterable.<T> ComponentList
asComponentList(java.lang.Class<T> componentClass, java.lang.Iterable<org.openqa.selenium.WebElement> elements)
Create and register a new list of component from the given element iterable.<T> ComponentList<T>
asComponentList(java.lang.Class<T> componentClass, java.util.List<org.openqa.selenium.WebElement> elements)
Create and register a new list of component from the given element iterable.<T> ComponentList<T>
asComponentList(java.lang.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(java.lang.Class<T> componentClass, java.lang.Iterable<org.openqa.selenium.WebElement> elements)
create and register a new fluent list.<T extends FluentWebElement>
FluentList<T>asFluentList(java.lang.Class<T> componentClass, java.util.List<org.openqa.selenium.WebElement> elements)
create and register a new fluent list.<T extends FluentWebElement>
FluentList<T>asFluentList(java.lang.Class<T> componentClass, org.openqa.selenium.WebElement... elements)
create and register a new fluent list.FluentList<FluentWebElement>
asFluentList(java.lang.Iterable<org.openqa.selenium.WebElement> elements)
create and register a new fluent list.FluentList<FluentWebElement>
asFluentList(java.util.List<org.openqa.selenium.WebElement> elements)
create and register a new fluent list.FluentList<FluentWebElement>
asFluentList(org.openqa.selenium.WebElement... elements)
create and register a new fluent list.FluentWait
await()
wait for an asynchronous callboolean
canTakeScreenShot()
Check if underlyingWebDriver
can take screenshot.org.openqa.selenium.Capabilities
capabilities()
Get the actual capabilities of the underlying Selenium WebDriver.CssSupport
css()
Features related to CSS loaded in the active page.FluentWebElement
el(org.openqa.selenium.WebElement rawElement)
Wrap existing raw selenium element into an element.EventsRegistry
events()
Retrieves an event registry to register event listeners.FluentJavascript
executeAsyncScript(java.lang.String script, java.lang.Object... args)
Execute a script, asynchronously.FluentJavascript
executeScript(java.lang.String script, java.lang.Object... args)
Execute a script, synchronously.FluentList<FluentWebElement>
find(java.lang.String selector, SearchFilter... filters)
Find list of elements with CSS selector and filters.FluentList<FluentWebElement>
find(java.util.List<org.openqa.selenium.WebElement> rawElements)
Wrap raw selenium elements into a list of elements.FluentList<FluentWebElement>
find(SearchFilter... filters)
Find list of elements with filters.FluentList<FluentWebElement>
find(org.openqa.selenium.By locator, SearchFilter... filters)
Find list of elements with Selenium locator and filters.protected ComponentsManager
getComponentsManager()
Returns theComponentsManager
required for this class.Configuration
getConfiguration()
Get the test adapter configuration.org.openqa.selenium.Cookie
getCookie(java.lang.String name)
return the corresponding cookie given a namejava.util.Set<org.openqa.selenium.Cookie>
getCookies()
return the cookies as a setorg.openqa.selenium.WebDriver
getDriver()
Get the actual underlying Selenium WebDriver.protected Search
getSearch()
Return theSearch
required for this class.void
goTo(java.lang.String url)
Open the url page<P extends FluentPage>
PgoTo(P page)
Open the page, using the url defined in the pagevoid
goToInNewTab(java.lang.String url)
Open the url page in a new tabContainerContext
inject(java.lang.Object container)
Inject object with FluentLenium resources.ContainerContext
injectComponent(java.lang.Object componentContainer, java.lang.Object parentContainer, org.openqa.selenium.SearchContext searchContext)
Inject object with FluentLenium resources, using given search context and parent container.boolean
isComponentClass(java.lang.Class<?> componentClass)
Check if this class is a component class.boolean
isComponentListClass(java.lang.Class<? extends java.util.List<?>> componentListClass)
Check if this class is a component list class.KeyboardActions
keyboard()
Execute keyboard actionsMouseActions
mouse()
Execute mouse actions<T> T
newComponent(java.lang.Class<T> componentClass, org.openqa.selenium.WebElement element)
Create and register a new component from the given element.<L extends java.util.List<T>,T>
LnewComponentList(java.lang.Class<L> listClass, java.lang.Class<T> componentClass)
Create and register an empty list of component.<L extends java.util.List<T>,T>
LnewComponentList(java.lang.Class<L> listClass, java.lang.Class<T> componentClass, java.util.List<T> componentsList)
Create and register a new list of component from the given component list.<L extends java.util.List<T>,T>
LnewComponentList(java.lang.Class<L> listClass, java.lang.Class<T> componentClass, T... componentsList)
Create and register a new list of component from the given component list.<T> ComponentList<T>
newComponentList(java.lang.Class<T> componentClass)
Create and register an empty list of component.<T> ComponentList<T>
newComponentList(java.lang.Class<T> componentClass, java.util.List<T> componentsList)
Create and register a new list of component from the given component list.<T> ComponentList<T>
newComponentList(java.lang.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 new fluent element from the given element.FluentList<FluentWebElement>
newFluentList()
create and register an empty fluent list.<T extends FluentWebElement>
FluentList<T>newFluentList(java.lang.Class<T> componentClass)
create and register an empty fluent list.<T extends FluentWebElement>
FluentList<T>newFluentList(java.lang.Class<T> componentClass, java.util.List<T> elements)
create and register a new fluent list.<T extends FluentWebElement>
FluentList<T>newFluentList(java.lang.Class<T> componentClass, T... elements)
create and register a new fluent list.FluentList<FluentWebElement>
newFluentList(java.util.List<FluentWebElement> elements)
create and register a new fluent list.FluentList<FluentWebElement>
newFluentList(FluentWebElement... elements)
create and register a new fluent list.<T> T
newInstance(java.lang.Class<T> cls)
Creates a new instance of a class inject it.java.lang.String
pageSource()
Return the source of the pagePerformanceTiming
performanceTiming()
Returns an object for accessing Performance Timing API queries.void
quit()
Quit the underlying web driver and release fluent driver resources.void
releaseFluent()
Release fluent driver resources.void
switchTo()
Switch to the default elementvoid
switchTo(FluentList<? extends FluentWebElement> elements)
Switch to the first selected Element (if element is null or not an iframe, or doesn't have an id then switch to the default)void
switchTo(FluentWebElement element)
Switch to the selected Element (if element is null or not an iframe, or doesn't have an id then switch to the default)void
switchToDefault()
Switch to the default elementvoid
takeHtmlDump()
Take a html dump of the browser DOM.void
takeHtmlDump(java.lang.String fileName)
Take a html dump of the browser DOM into a file given by the fileName param.void
takeScreenshot()
Take a snapshot of the browser.void
takeScreenshot(java.lang.String fileName)
Take a snapshot of the browser into a file given by the fileName param.java.lang.String
url()
Return the url of the page.WindowAction
window()
Exposes methods on browser window-
Methods inherited from class org.fluentlenium.core.FluentControlImpl
getAwaitAtMost, getAwaitPollingEvery, getBaseUrl, getBrowserTimeout, getBrowserTimeoutRetries, getCapabilities, getConfigurationDefaults, getConfigurationFactory, getControlContainer, getCustomProperty, getDeleteCookies, getDriverLifecycle, getEventsEnabled, getFluentControl, getHtmlDumpMode, getHtmlDumpPath, getImplicitlyWait, getPageLoadTimeout, getRemoteUrl, getScreenshotMode, getScreenshotPath, getScriptTimeout, getWebDriver, setAwaitAtMost, setAwaitPollingEvery, setBaseUrl, setBrowserTimeout, setBrowserTimeoutRetries, setCapabilities, setConfigurationFactory, setCustomProperty, setDeleteCookies, setDriverLifecycle, setEventsEnabled, setHtmlDumpMode, setHtmlDumpPath, setImplicitlyWait, setPageLoadTimeout, setRemoteUrl, setScreenshotMode, setScreenshotPath, setScriptTimeout, setWebDriver
-
-
-
-
Constructor Detail
-
FluentDriver
public FluentDriver(org.openqa.selenium.WebDriver driver, Configuration configuration, FluentControl adapter)
Wrap the driver into a Fluent driver.- Parameters:
driver
- underlying selenium driverconfiguration
- configurationadapter
- adapter fluent control interface
-
-
Method Detail
-
getConfiguration
public Configuration getConfiguration()
Description copied from class:FluentControlImpl
Get the test adapter configuration.- Overrides:
getConfiguration
in classFluentControlImpl
- Returns:
- configuration
-
takeHtmlDump
public void takeHtmlDump()
Description copied from interface:SnapshotControl
Take a html dump of the browser DOM. By default the file will be a html named by the current timestamp.- Specified by:
takeHtmlDump
in interfaceSnapshotControl
- Overrides:
takeHtmlDump
in classFluentControlImpl
-
takeHtmlDump
public void takeHtmlDump(java.lang.String fileName)
Description copied from interface:SnapshotControl
Take a html dump of the browser DOM into a file given by the fileName param.- Specified by:
takeHtmlDump
in interfaceSnapshotControl
- Overrides:
takeHtmlDump
in classFluentControlImpl
- Parameters:
fileName
- file name for html dump
-
canTakeScreenShot
public boolean canTakeScreenShot()
Description copied from interface:SnapshotControl
Check if underlyingWebDriver
can take screenshot.- Specified by:
canTakeScreenShot
in interfaceSnapshotControl
- Overrides:
canTakeScreenShot
in classFluentControlImpl
- Returns:
- true if screenshot can be taken, false otherwise
-
takeScreenshot
public void takeScreenshot()
Description copied from interface:SnapshotControl
Take a snapshot of the browser. By default the file will be a png named by the current timestamp.- Specified by:
takeScreenshot
in interfaceSnapshotControl
- Overrides:
takeScreenshot
in classFluentControlImpl
-
takeScreenshot
public void takeScreenshot(java.lang.String fileName)
Description copied from interface:SnapshotControl
Take a snapshot of the browser into a file given by the fileName param.- Specified by:
takeScreenshot
in interfaceSnapshotControl
- Overrides:
takeScreenshot
in classFluentControlImpl
- Parameters:
fileName
- file name for screenshot
-
getDriver
public org.openqa.selenium.WebDriver getDriver()
Description copied from interface:SeleniumDriverControl
Get the actual underlying Selenium WebDriver.To customize the WebDriver, you should configure
FluentControlImpl.getWebDriver()
or overrideFluentAdapter.newWebDriver()
.This method can't be override to customize the WebDriver.
- Returns:
- The actual underlying Selenium WebDriver
-
events
public EventsRegistry events()
Description copied from interface:EventsControl
Retrieves an event registry to register event listeners.- Specified by:
events
in interfaceEventsControl
- Overrides:
events
in classFluentControlImpl
- Returns:
- the event registry.
-
mouse
public MouseActions mouse()
Description copied from interface:InputControl
Execute mouse actions- Specified by:
mouse
in interfaceInputControl
- Overrides:
mouse
in classFluentControlImpl
- Returns:
- mouse actions object
-
keyboard
public KeyboardActions keyboard()
Description copied from interface:InputControl
Execute keyboard actions- Specified by:
keyboard
in interfaceInputControl
- Overrides:
keyboard
in classFluentControlImpl
- Returns:
- mouse keyboard object
-
window
public WindowAction window()
Description copied from interface:NavigationControl
Exposes methods on browser window- Specified by:
window
in interfaceNavigationControl
- Overrides:
window
in classFluentControlImpl
- Returns:
- Window actions
-
await
public FluentWait await()
Description copied from interface:AwaitControl
wait for an asynchronous call- Specified by:
await
in interfaceAwaitControl
- Overrides:
await
in classFluentControlImpl
- Returns:
- FluentWait element
-
getCookies
public java.util.Set<org.openqa.selenium.Cookie> getCookies()
Description copied from interface:NavigationControl
return the cookies as a set- Specified by:
getCookies
in interfaceNavigationControl
- Overrides:
getCookies
in classFluentControlImpl
- Returns:
- set of cookies
-
getCookie
public org.openqa.selenium.Cookie getCookie(java.lang.String name)
Description copied from interface:NavigationControl
return the corresponding cookie given a name- Specified by:
getCookie
in interfaceNavigationControl
- Overrides:
getCookie
in classFluentControlImpl
- Parameters:
name
- cookie name- Returns:
- cookie selected by name
-
url
public java.lang.String url()
Description copied from interface:NavigationControl
Return the url of the page. If a base url is provided, the current url will be relative to that base url.- Specified by:
url
in interfaceNavigationControl
- Overrides:
url
in classFluentControlImpl
- Returns:
- current URL
-
pageSource
public java.lang.String pageSource()
Description copied from interface:NavigationControl
Return the source of the page- Specified by:
pageSource
in interfaceNavigationControl
- Overrides:
pageSource
in classFluentControlImpl
- Returns:
- source of the page under test
-
goTo
public <P extends FluentPage> P goTo(P page)
Description copied from interface:NavigationControl
Open the page, using the url defined in the page- Specified by:
goTo
in interfaceNavigationControl
- Overrides:
goTo
in classFluentControlImpl
- Type Parameters:
P
- Type of FluentPage- Parameters:
page
- page to open- Returns:
- Opened page.
- See Also:
FluentPage.getUrl()
-
goTo
public void goTo(java.lang.String url)
Description copied from interface:NavigationControl
Open the url page- Specified by:
goTo
in interfaceNavigationControl
- Overrides:
goTo
in classFluentControlImpl
- Parameters:
url
- page URL to visit
-
goToInNewTab
public void goToInNewTab(java.lang.String url)
Description copied from interface:NavigationControl
Open the url page in a new tab- Specified by:
goToInNewTab
in interfaceNavigationControl
- Overrides:
goToInNewTab
in classFluentControlImpl
- Parameters:
url
- the url of the page
-
capabilities
public org.openqa.selenium.Capabilities capabilities()
Description copied from interface:CapabilitiesControl
Get the actual capabilities of the underlying Selenium WebDriver.- Specified by:
capabilities
in interfaceCapabilitiesControl
- Overrides:
capabilities
in classFluentControlImpl
- Returns:
- actual capabilities.
- See Also:
HasCapabilities.getCapabilities()
-
executeScript
public FluentJavascript executeScript(java.lang.String script, java.lang.Object... args)
Description copied from interface:JavascriptControl
Execute a script, synchronously.- Specified by:
executeScript
in interfaceJavascriptControl
- Overrides:
executeScript
in classFluentControlImpl
- Parameters:
script
- script source to executeargs
- script arguments- Returns:
- an object wrapping the result
-
executeAsyncScript
public FluentJavascript executeAsyncScript(java.lang.String script, java.lang.Object... args)
Description copied from interface:JavascriptControl
Execute a script, asynchronously.- Specified by:
executeAsyncScript
in interfaceJavascriptControl
- Overrides:
executeAsyncScript
in classFluentControlImpl
- Parameters:
script
- script source to executeargs
- script arguments- Returns:
- an object wrapping the result
-
switchTo
public void switchTo(FluentList<? extends FluentWebElement> elements)
Description copied from interface:NavigationControl
Switch to the first selected Element (if element is null or not an iframe, or doesn't have an id then switch to the default)- Specified by:
switchTo
in interfaceNavigationControl
- Overrides:
switchTo
in classFluentControlImpl
- Parameters:
elements
- fluent list of fluent web elements
-
switchTo
public void switchTo(FluentWebElement element)
Description copied from interface:NavigationControl
Switch to the selected Element (if element is null or not an iframe, or doesn't have an id then switch to the default)- Specified by:
switchTo
in interfaceNavigationControl
- Overrides:
switchTo
in classFluentControlImpl
- Parameters:
element
- fluent web element to switch to
-
switchTo
public void switchTo()
Description copied from interface:NavigationControl
Switch to the default element- Specified by:
switchTo
in interfaceNavigationControl
- Overrides:
switchTo
in classFluentControlImpl
-
switchToDefault
public void switchToDefault()
Description copied from interface:NavigationControl
Switch to the default element- Specified by:
switchToDefault
in interfaceNavigationControl
- Overrides:
switchToDefault
in classFluentControlImpl
-
alert
public Alert alert()
Description copied from interface:AlertControl
Get an object to control the alert window.- Specified by:
alert
in interfaceAlertControl
- Overrides:
alert
in classFluentControlImpl
- Returns:
- an alert object
-
quit
public void quit()
Quit the underlying web driver and release fluent driver resources.
-
releaseFluent
public void releaseFluent()
Release fluent driver resources.
-
getComponentsManager
protected ComponentsManager getComponentsManager()
Returns theComponentsManager
required for this class.- Returns:
- the components manager
-
getSearch
protected Search getSearch()
Return theSearch
required for this class.- Returns:
- the Search object
-
inject
public ContainerContext inject(java.lang.Object container)
Description copied from interface:FluentInjectControl
Inject object with FluentLenium resources.- Specified by:
inject
in interfaceFluentInjectControl
- Overrides:
inject
in classFluentControlImpl
- Parameters:
container
- container to inject with FluentLenium resources- Returns:
- The container context related to the injected container
-
newInstance
public <T> T newInstance(java.lang.Class<T> cls)
Description copied from interface:FluentInjectControl
Creates a new instance of a class inject it.- Specified by:
newInstance
in interfaceFluentInjectControl
- Overrides:
newInstance
in classFluentControlImpl
- Type Parameters:
T
- type of the object- Parameters:
cls
- class of the object to create- Returns:
- new container instance
- See Also:
FluentInjectControl.inject(Object)
-
injectComponent
public ContainerContext injectComponent(java.lang.Object componentContainer, java.lang.Object parentContainer, org.openqa.selenium.SearchContext searchContext)
Description copied from interface:FluentInjectControl
Inject object with FluentLenium resources, using given search context and parent container.- Specified by:
injectComponent
in interfaceFluentInjectControl
- Overrides:
injectComponent
in classFluentControlImpl
- Parameters:
componentContainer
- container to inject with FluentLenium resourcesparentContainer
- parent containersearchContext
- search context to use for injection- Returns:
- The container context related to the injected container
-
css
public CssSupport css()
Description copied from interface:CssControl
Features related to CSS loaded in the active page.- Specified by:
css
in interfaceCssControl
- Overrides:
css
in classFluentControlImpl
- Returns:
- Css support
-
performanceTiming
public PerformanceTiming performanceTiming()
Description copied from interface:PerformanceTimingControl
Returns an object for accessing Performance Timing API queries.- Specified by:
performanceTiming
in interfacePerformanceTimingControl
- Overrides:
performanceTiming
in classFluentControlImpl
- Returns:
- a
PerformanceTiming
object
-
find
public FluentList<FluentWebElement> find(java.lang.String selector, SearchFilter... filters)
Description copied from interface:SearchControl
Find list of elements with CSS selector and filters.- Specified by:
find
in interfaceSearchControl<FluentWebElement>
- Overrides:
find
in classFluentControlImpl
- Parameters:
selector
- CSS selectorfilters
- set of filters- Returns:
- list of element
-
find
public FluentList<FluentWebElement> find(org.openqa.selenium.By locator, SearchFilter... filters)
Description copied from interface:SearchControl
Find list of elements with Selenium locator and filters.- Specified by:
find
in interfaceSearchControl<FluentWebElement>
- Overrides:
find
in classFluentControlImpl
- Parameters:
locator
- elements locatorfilters
- filters set- Returns:
- list of elements
-
find
public FluentList<FluentWebElement> find(SearchFilter... filters)
Description copied from interface:SearchControl
Find list of elements with filters.- Specified by:
find
in interfaceSearchControl<FluentWebElement>
- Overrides:
find
in classFluentControlImpl
- Parameters:
filters
- set of filters in the current context- Returns:
- list of elements
-
find
public FluentList<FluentWebElement> find(java.util.List<org.openqa.selenium.WebElement> rawElements)
Description copied from interface:SearchControl
Wrap raw selenium elements into a list of elements.- Specified by:
find
in interfaceSearchControl<FluentWebElement>
- Overrides:
find
in classFluentControlImpl
- Parameters:
rawElements
- raw selenium elements- Returns:
- list of element
-
$
public FluentList<FluentWebElement> $(java.util.List<org.openqa.selenium.WebElement> rawElements)
Description copied from interface:SearchControl
Wrap raw selenium elements into a list of elements.- Parameters:
rawElements
- raw selenium elements- Returns:
- list of element
-
el
public FluentWebElement el(org.openqa.selenium.WebElement rawElement)
Description copied from interface:SearchControl
Wrap existing raw selenium element into an element.- Specified by:
el
in interfaceSearchControl<FluentWebElement>
- Overrides:
el
in classFluentControlImpl
- Parameters:
rawElement
- raw selenium element- Returns:
- element
-
newComponentList
public <L extends java.util.List<T>,T> L newComponentList(java.lang.Class<L> listClass, java.lang.Class<T> componentClass)
Description copied from interface:ComponentInstantiator
Create and register an empty list of component.- Specified by:
newComponentList
in interfaceComponentInstantiator
- Overrides:
newComponentList
in classFluentControlImpl
- 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
public <T> ComponentList asComponentList(java.lang.Class<T> componentClass, java.lang.Iterable<org.openqa.selenium.WebElement> elements)
Description copied from interface:ComponentInstantiator
Create and register a new list of component from the given element iterable.- Specified by:
asComponentList
in interfaceComponentInstantiator
- Overrides:
asComponentList
in classFluentControlImpl
- Type Parameters:
T
- type of the component- Parameters:
componentClass
- type of the componentelements
- elements- Returns:
- new list of components
-
newComponentList
public <L extends java.util.List<T>,T> L newComponentList(java.lang.Class<L> listClass, java.lang.Class<T> componentClass, T... componentsList)
Description copied from interface:ComponentInstantiator
Create and register a new list of component from the given component list.- Specified by:
newComponentList
in interfaceComponentInstantiator
- Overrides:
newComponentList
in classFluentControlImpl
- 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
-
asFluentList
public <T extends FluentWebElement> FluentList<T> asFluentList(java.lang.Class<T> componentClass, java.lang.Iterable<org.openqa.selenium.WebElement> elements)
Description copied from interface:ComponentInstantiator
create and register a new fluent list.- Specified by:
asFluentList
in interfaceComponentInstantiator
- Overrides:
asFluentList
in classFluentControlImpl
- Type Parameters:
T
- type of the component- Parameters:
componentClass
- class of the componentelements
- list of elements- Returns:
- new list of fluent web element
-
isComponentClass
public boolean isComponentClass(java.lang.Class<?> componentClass)
Description copied from interface:ComponentInstantiator
Check if this class is a component class.- Specified by:
isComponentClass
in interfaceComponentInstantiator
- Overrides:
isComponentClass
in classFluentControlImpl
- Parameters:
componentClass
- class to check- Returns:
- true if this class is a component class, false otherwise
-
asComponentList
public <T> ComponentList<T> asComponentList(java.lang.Class<T> componentClass, java.util.List<org.openqa.selenium.WebElement> elements)
Description copied from interface:ComponentInstantiator
Create and register a new list of component from the given element iterable.- Specified by:
asComponentList
in interfaceComponentInstantiator
- Overrides:
asComponentList
in classFluentControlImpl
- Type Parameters:
T
- type of the component- Parameters:
componentClass
- type of the componentelements
- elements- Returns:
- new list of components
-
asFluentList
public <T extends FluentWebElement> FluentList<T> asFluentList(java.lang.Class<T> componentClass, org.openqa.selenium.WebElement... elements)
Description copied from interface:ComponentInstantiator
create and register a new fluent list.- Specified by:
asFluentList
in interfaceComponentInstantiator
- Overrides:
asFluentList
in classFluentControlImpl
- Type Parameters:
T
- type of the component- Parameters:
componentClass
- class of the componentelements
- list of elements- Returns:
- new list of fluent web element
-
newFluentList
public <T extends FluentWebElement> FluentList<T> newFluentList(java.lang.Class<T> componentClass)
Description copied from interface:ComponentInstantiator
create and register an empty fluent list.- Specified by:
newFluentList
in interfaceComponentInstantiator
- Overrides:
newFluentList
in classFluentControlImpl
- Type Parameters:
T
- type of the component- Parameters:
componentClass
- class of the component- Returns:
- new list of fluent web element
-
newFluent
public FluentWebElement newFluent(org.openqa.selenium.WebElement element)
Description copied from interface:ComponentInstantiator
Create and register a new fluent element from the given element.- Specified by:
newFluent
in interfaceComponentInstantiator
- Overrides:
newFluent
in classFluentControlImpl
- Parameters:
element
- wrapped element- Returns:
- new instance of the component
-
isComponentListClass
public boolean isComponentListClass(java.lang.Class<? extends java.util.List<?>> componentListClass)
Description copied from interface:ComponentInstantiator
Check if this class is a component list class.- Specified by:
isComponentListClass
in interfaceComponentInstantiator
- Overrides:
isComponentListClass
in classFluentControlImpl
- Parameters:
componentListClass
- class to check- Returns:
- true if this class is a component list class, false otherwise
-
asFluentList
public FluentList<FluentWebElement> asFluentList(org.openqa.selenium.WebElement... elements)
Description copied from interface:ComponentInstantiator
create and register a new fluent list.- Specified by:
asFluentList
in interfaceComponentInstantiator
- Overrides:
asFluentList
in classFluentControlImpl
- Parameters:
elements
- list of elements- Returns:
- new list of fluent web element
-
asFluentList
public FluentList<FluentWebElement> asFluentList(java.lang.Iterable<org.openqa.selenium.WebElement> elements)
Description copied from interface:ComponentInstantiator
create and register a new fluent list.- Specified by:
asFluentList
in interfaceComponentInstantiator
- Overrides:
asFluentList
in classFluentControlImpl
- Parameters:
elements
- list of elements- Returns:
- new list of fluent web element
-
asComponentList
public <L extends java.util.List<T>,T> L asComponentList(java.lang.Class<L> listClass, java.lang.Class<T> componentClass, org.openqa.selenium.WebElement... elements)
Description copied from interface:ComponentInstantiator
Create and register a new list of component from the given element iterable.- Specified by:
asComponentList
in interfaceComponentInstantiator
- Overrides:
asComponentList
in classFluentControlImpl
- 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
public <L extends java.util.List<T>,T> L asComponentList(java.lang.Class<L> listClass, java.lang.Class<T> componentClass, java.lang.Iterable<org.openqa.selenium.WebElement> elements)
Description copied from interface:ComponentInstantiator
Create and register a new list of component from the given element iterable.- Specified by:
asComponentList
in interfaceComponentInstantiator
- Overrides:
asComponentList
in classFluentControlImpl
- 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
-
asFluentList
public FluentList<FluentWebElement> asFluentList(java.util.List<org.openqa.selenium.WebElement> elements)
Description copied from interface:ComponentInstantiator
create and register a new fluent list.- Specified by:
asFluentList
in interfaceComponentInstantiator
- Overrides:
asFluentList
in classFluentControlImpl
- Parameters:
elements
- list of elements- Returns:
- new list of fluent web element
-
asFluentList
public <T extends FluentWebElement> FluentList<T> asFluentList(java.lang.Class<T> componentClass, java.util.List<org.openqa.selenium.WebElement> elements)
Description copied from interface:ComponentInstantiator
create and register a new fluent list.- Specified by:
asFluentList
in interfaceComponentInstantiator
- Overrides:
asFluentList
in classFluentControlImpl
- Type Parameters:
T
- type of the component- Parameters:
componentClass
- class of the componentelements
- list of elements- Returns:
- new list of fluent web element
-
asComponentList
public <T> ComponentList<T> asComponentList(java.lang.Class<T> componentClass, org.openqa.selenium.WebElement... elements)
Description copied from interface:ComponentInstantiator
Create and register a new list of component from the given element iterable.- Specified by:
asComponentList
in interfaceComponentInstantiator
- Overrides:
asComponentList
in classFluentControlImpl
- Type Parameters:
T
- type of the component- Parameters:
componentClass
- type of the componentelements
- elements- Returns:
- new list of components
-
newComponent
public <T> T newComponent(java.lang.Class<T> componentClass, org.openqa.selenium.WebElement element)
Description copied from interface:ComponentInstantiator
Create and register a new component from the given element.- Specified by:
newComponent
in interfaceComponentInstantiator
- Overrides:
newComponent
in classFluentControlImpl
- Type Parameters:
T
- type of the component- Parameters:
componentClass
- type of the componentelement
- wrapped element- Returns:
- new instance of the component
-
newComponentList
public <T> ComponentList<T> newComponentList(java.lang.Class<T> componentClass, T... componentsList)
Description copied from interface:ComponentInstantiator
Create and register a new list of component from the given component list.- Specified by:
newComponentList
in interfaceComponentInstantiator
- Overrides:
newComponentList
in classFluentControlImpl
- Type Parameters:
T
- type of the component- Parameters:
componentClass
- type of the componentcomponentsList
- components list- Returns:
- new list of components
-
newComponentList
public <T> ComponentList<T> newComponentList(java.lang.Class<T> componentClass, java.util.List<T> componentsList)
Description copied from interface:ComponentInstantiator
Create and register a new list of component from the given component list.- Specified by:
newComponentList
in interfaceComponentInstantiator
- Overrides:
newComponentList
in classFluentControlImpl
- Type Parameters:
T
- type of the component- Parameters:
componentClass
- type of the componentcomponentsList
- components list- Returns:
- new list of components
-
newComponentList
public <L extends java.util.List<T>,T> L newComponentList(java.lang.Class<L> listClass, java.lang.Class<T> componentClass, java.util.List<T> componentsList)
Description copied from interface:ComponentInstantiator
Create and register a new list of component from the given component list.- Specified by:
newComponentList
in interfaceComponentInstantiator
- Overrides:
newComponentList
in classFluentControlImpl
- 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
-
newFluentList
public FluentList<FluentWebElement> newFluentList()
Description copied from interface:ComponentInstantiator
create and register an empty fluent list.- Specified by:
newFluentList
in interfaceComponentInstantiator
- Overrides:
newFluentList
in classFluentControlImpl
- Returns:
- new list of fluent web element
-
newFluentList
public FluentList<FluentWebElement> newFluentList(java.util.List<FluentWebElement> elements)
Description copied from interface:ComponentInstantiator
create and register a new fluent list.- Specified by:
newFluentList
in interfaceComponentInstantiator
- Overrides:
newFluentList
in classFluentControlImpl
- Parameters:
elements
- list of elements- Returns:
- new list of fluent web element
-
newComponentList
public <T> ComponentList<T> newComponentList(java.lang.Class<T> componentClass)
Description copied from interface:ComponentInstantiator
Create and register an empty list of component.- Specified by:
newComponentList
in interfaceComponentInstantiator
- Overrides:
newComponentList
in classFluentControlImpl
- Type Parameters:
T
- type of the component- Parameters:
componentClass
- type of the component- Returns:
- new list of components
-
newFluentList
public FluentList<FluentWebElement> newFluentList(FluentWebElement... elements)
Description copied from interface:ComponentInstantiator
create and register a new fluent list.- Specified by:
newFluentList
in interfaceComponentInstantiator
- Overrides:
newFluentList
in classFluentControlImpl
- Parameters:
elements
- list of elements- Returns:
- new list of fluent web element
-
newFluentList
public <T extends FluentWebElement> FluentList<T> newFluentList(java.lang.Class<T> componentClass, java.util.List<T> elements)
Description copied from interface:ComponentInstantiator
create and register a new fluent list.- Specified by:
newFluentList
in interfaceComponentInstantiator
- Overrides:
newFluentList
in classFluentControlImpl
- Type Parameters:
T
- type of the component- Parameters:
componentClass
- class of the componentelements
- list of elements- Returns:
- new list of fluent web element
-
newFluentList
public <T extends FluentWebElement> FluentList<T> newFluentList(java.lang.Class<T> componentClass, T... elements)
Description copied from interface:ComponentInstantiator
create and register a new fluent list.- Specified by:
newFluentList
in interfaceComponentInstantiator
- Overrides:
newFluentList
in classFluentControlImpl
- Type Parameters:
T
- type of the component- Parameters:
componentClass
- class of the componentelements
- list of elements- Returns:
- new list of fluent web element
-
asComponentList
public <L extends java.util.List<T>,T> L asComponentList(java.lang.Class<L> listClass, java.lang.Class<T> componentClass, java.util.List<org.openqa.selenium.WebElement> elements)
Description copied from interface:ComponentInstantiator
Create and register a new list of component from the given element iterable.- Specified by:
asComponentList
in interfaceComponentInstantiator
- Overrides:
asComponentList
in classFluentControlImpl
- 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
-
-