Package org.fluentlenium.adapter
Class FluentAdapter
- java.lang.Object
-
- org.fluentlenium.core.FluentControlImpl
-
- org.fluentlenium.adapter.FluentAdapter
-
- All Implemented Interfaces:
Configuration,ConfigurationMutator,ConfigurationProperties,InputControl,AlertControl,CapabilitiesControl,ComponentInstantiator,CssControl,EventsControl,FluentControl,FluentInjectControl,NavigationControl,JavascriptControl,SearchControl<FluentWebElement>,SeleniumDriverControl,SnapshotControl,AwaitControl
- Direct Known Subclasses:
FluentStandalone,FluentTestRunnerAdapter
public class FluentAdapter extends FluentControlImpl implements FluentControl
Generic adapter toFluentDriver.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.fluentlenium.configuration.ConfigurationProperties
ConfigurationProperties.DriverLifecycle, ConfigurationProperties.TriggerMode
-
-
Constructor Summary
Constructors Constructor Description FluentAdapter()Creates a new fluent adapter.FluentAdapter(FluentControlContainer controlContainer)Creates a new fluent adapter, using given control interface container.FluentAdapter(FluentControlContainer controlContainer, java.lang.Class clazz)Creates a new fluent adapter, using given control interface container.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.openqa.selenium.WebDrivergetDriver()Get the actual underlying Selenium WebDriver.ContainerFluentControlgetFluentControl()voidinitFluent(org.openqa.selenium.WebDriver webDriver)Load aWebDriverinto this adapter.org.openqa.selenium.WebDrivernewWebDriver()Creates a newWebDriverinstance.voidreleaseFluent()Release the currentWebDriverfrom this adapter.-
Methods inherited from class org.fluentlenium.core.FluentControlImpl
alert, asComponentList, asComponentList, asComponentList, asComponentList, asComponentList, asComponentList, asFluentList, asFluentList, asFluentList, asFluentList, asFluentList, asFluentList, await, canTakeScreenShot, capabilities, css, el, events, executeAsyncScript, executeScript, find, find, find, find, getAwaitAtMost, getAwaitPollingEvery, getBaseUrl, getBrowserTimeout, getBrowserTimeoutRetries, getCapabilities, getConfiguration, getConfigurationDefaults, getConfigurationFactory, getControlContainer, getCookie, getCookies, getCustomProperty, getDeleteCookies, getDriverLifecycle, getEventsEnabled, getHtmlDumpMode, getHtmlDumpPath, getImplicitlyWait, getPageLoadTimeout, getRemoteUrl, getScreenshotMode, getScreenshotPath, getScriptTimeout, getWebDriver, goTo, goTo, goToInNewTab, inject, injectComponent, isComponentClass, isComponentListClass, keyboard, mouse, newComponent, newComponentList, newComponentList, newComponentList, newComponentList, newComponentList, newComponentList, newFluent, newFluentList, newFluentList, newFluentList, newFluentList, newFluentList, newFluentList, newInstance, pageSource, setAwaitAtMost, setAwaitPollingEvery, setBaseUrl, setBrowserTimeout, setBrowserTimeoutRetries, setCapabilities, setConfigurationFactory, setCustomProperty, setDeleteCookies, setDriverLifecycle, setEventsEnabled, setHtmlDumpMode, setHtmlDumpPath, setImplicitlyWait, setPageLoadTimeout, setRemoteUrl, setScreenshotMode, setScreenshotPath, setScriptTimeout, setWebDriver, switchTo, switchTo, switchTo, switchToDefault, takeHtmlDump, takeHtmlDump, takeScreenshot, takeScreenshot, url, window
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.fluentlenium.core.alert.AlertControl
alert
-
Methods inherited from interface org.fluentlenium.core.wait.AwaitControl
await
-
Methods inherited from interface org.fluentlenium.core.capabilities.CapabilitiesControl
capabilities
-
Methods inherited from interface org.fluentlenium.core.components.ComponentInstantiator
asComponentList, asComponentList, asComponentList, asComponentList, asComponentList, asComponentList, asFluentList, asFluentList, asFluentList, asFluentList, asFluentList, asFluentList, isComponentClass, isComponentListClass, newComponent, newComponentList, newComponentList, newComponentList, newComponentList, newComponentList, newComponentList, newFluent, newFluentList, newFluentList, newFluentList, newFluentList, newFluentList, newFluentList
-
Methods inherited from interface org.fluentlenium.configuration.ConfigurationMutator
setAwaitAtMost, setAwaitPollingEvery, setBaseUrl, setBrowserTimeout, setBrowserTimeoutRetries, setCapabilities, setConfigurationFactory, setCustomProperty, setDeleteCookies, setDriverLifecycle, setEventsEnabled, setHtmlDumpMode, setHtmlDumpPath, setImplicitlyWait, setPageLoadTimeout, setRemoteUrl, setScreenshotMode, setScreenshotPath, setScriptTimeout, setWebDriver
-
Methods inherited from interface org.fluentlenium.configuration.ConfigurationProperties
getAwaitAtMost, getAwaitPollingEvery, getBaseUrl, getBrowserTimeout, getBrowserTimeoutRetries, getCapabilities, getConfigurationDefaults, getConfigurationFactory, getCustomProperty, getDeleteCookies, getDriverLifecycle, getEventsEnabled, getHtmlDumpMode, getHtmlDumpPath, getImplicitlyWait, getPageLoadTimeout, getRemoteUrl, getScreenshotMode, getScreenshotPath, getScriptTimeout, getWebDriver
-
Methods inherited from interface org.fluentlenium.core.css.CssControl
css
-
Methods inherited from interface org.fluentlenium.core.events.EventsControl
events
-
Methods inherited from interface org.fluentlenium.core.inject.FluentInjectControl
inject, injectComponent, newInstance
-
Methods inherited from interface org.fluentlenium.core.action.InputControl
keyboard, mouse
-
Methods inherited from interface org.fluentlenium.core.script.JavascriptControl
executeAsyncScript, executeScript
-
Methods inherited from interface org.fluentlenium.core.navigation.NavigationControl
getCookie, getCookies, goTo, goTo, goToInNewTab, pageSource, switchTo, switchTo, switchTo, switchToDefault, url, window
-
Methods inherited from interface org.fluentlenium.core.search.SearchControl
$, $, $, $, el, el, el, el, find, find, find, find
-
Methods inherited from interface org.fluentlenium.core.snapshot.SnapshotControl
canTakeScreenShot, takeHtmlDump, takeHtmlDump, takeScreenshot, takeScreenshot
-
-
-
-
Constructor Detail
-
FluentAdapter
public FluentAdapter()
Creates a new fluent adapter.
-
FluentAdapter
public FluentAdapter(FluentControlContainer controlContainer)
Creates a new fluent adapter, using given control interface container.- Parameters:
controlContainer- control interface container
-
FluentAdapter
public FluentAdapter(FluentControlContainer controlContainer, java.lang.Class clazz)
Creates a new fluent adapter, using given control interface container.- Parameters:
controlContainer- control interface containerclazz- class from which annotation configuration will be looked up
-
-
Method Detail
-
getFluentControl
public ContainerFluentControl getFluentControl()
- Overrides:
getFluentControlin classFluentControlImpl
-
getDriver
public final org.openqa.selenium.WebDriver getDriver()
Description copied from interface:SeleniumDriverControlGet the actual underlying Selenium WebDriver.To customize the WebDriver, you should configure
FluentControlImpl.getWebDriver()or overridenewWebDriver().This method can't be override to customize the WebDriver.
- Specified by:
getDriverin interfaceSeleniumDriverControl- Returns:
- The actual underlying Selenium WebDriver
-
initFluent
public void initFluent(org.openqa.selenium.WebDriver webDriver)
Load aWebDriverinto this adapter.This method should not be called by end user.
- Parameters:
webDriver- webDriver to use.- Throws:
java.lang.IllegalStateException- when trying to register a different webDriver that the current one.
-
releaseFluent
public void releaseFluent()
Release the currentWebDriverfrom this adapter.This method should not be called by end user.
-
newWebDriver
public org.openqa.selenium.WebDriver newWebDriver()
Creates a newWebDriverinstance.This method should not be called by end user, but may be overriden if required.
Before overriding this method, you should consider using
WebDriversregistry and configurationConfigurationProperties.getWebDriver().To retrieve the current managed
WebDriver, callgetDriver()instead.- Returns:
- A new WebDriver instance.
- See Also:
getDriver()
-
-