Package org.fluentlenium.adapter
Class FluentTestRunnerAdapter
- java.lang.Object
-
- org.fluentlenium.core.FluentControlImpl
-
- org.fluentlenium.adapter.FluentAdapter
-
- org.fluentlenium.adapter.FluentTestRunnerAdapter
-
- All Implemented Interfaces:
Configuration
,ConfigurationMutator
,ConfigurationProperties
,InputControl
,AlertControl
,CapabilitiesControl
,ComponentInstantiator
,CssControl
,EventsControl
,FluentControl
,FluentInjectControl
,NavigationControl
,JavascriptControl
,SearchControl<FluentWebElement>
,SeleniumDriverControl
,SnapshotControl
,AwaitControl
public class FluentTestRunnerAdapter extends FluentAdapter
FluentLenium Test Runner Adapter.Extends this class to provide FluentLenium support to your Test class.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.fluentlenium.configuration.ConfigurationProperties
ConfigurationProperties.DriverLifecycle, ConfigurationProperties.TriggerMode
-
-
Constructor Summary
Constructors Constructor Description FluentTestRunnerAdapter()
Creates a new test runner adapter.FluentTestRunnerAdapter(FluentControlContainer driverContainer)
Creates a test runner adapter, with a custom driver container.FluentTestRunnerAdapter(FluentControlContainer driverContainer, java.lang.Class clazz, SharedMutator sharedMutator)
Creates a test runner adapter, with a customer driver container and a customer shared mutator.FluentTestRunnerAdapter(FluentControlContainer driverContainer, SharedMutator sharedMutator)
Creates a test runner adapter, with a customer driver container and a customer shared mutator.FluentTestRunnerAdapter(SharedMutator sharedMutator)
Creates a test runner adapter, with a custom shared mutator.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static void
afterClass(java.lang.Class<?> testClass)
Invoked when a test class has finished (whatever the success of failing status)protected void
failed()
Invoked when a test method has failed (before finished)protected void
failed(java.lang.Class<?> testClass)
Invoked when a test method has failed (before finished)protected void
failed(java.lang.Class<?> testClass, java.lang.String testName)
Invoked when a test method has failed (before finished)protected void
failed(java.lang.String testName)
Invoked when a test method has failed (before finished)protected void
failed(java.lang.Throwable e, java.lang.Class<?> testClass, java.lang.String testName)
Invoked when a test method has failed (before finished)protected void
finished()
Invoked when a test method has finished (whatever the success of failing status)protected void
finished(java.lang.Class<?> testClass)
Invoked when a test method has finished (whatever the success of failing status)protected void
finished(java.lang.Class<?> testClass, java.lang.String testName)
Invoked when a test method has finished (whatever the success of failing status)protected void
finished(java.lang.String testName)
Invoked when a test method has finished (whatever the success of failing status)protected SharedWebDriver
getSharedWebDriver(SharedMutator.EffectiveParameters<?> parameters, java.util.concurrent.ExecutorService webDriverExecutor)
Returns SharedDriver instanceprotected void
starting()
Invoked when a test method is starting.protected void
starting(java.lang.Class<?> testClass)
Invoked when a test method is starting.protected void
starting(java.lang.Class<?> testClass, java.lang.String testName)
Invoked when a test method is starting.protected void
starting(java.lang.String testName)
Invoked when a test method is starting.-
Methods inherited from class org.fluentlenium.adapter.FluentAdapter
getDriver, getFluentControl, initFluent, newWebDriver, releaseFluent
-
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
-
FluentTestRunnerAdapter
public FluentTestRunnerAdapter()
Creates a new test runner adapter.
-
FluentTestRunnerAdapter
public FluentTestRunnerAdapter(FluentControlContainer driverContainer)
Creates a test runner adapter, with a custom driver container.- Parameters:
driverContainer
- driver container
-
FluentTestRunnerAdapter
public FluentTestRunnerAdapter(SharedMutator sharedMutator)
Creates a test runner adapter, with a custom shared mutator.- Parameters:
sharedMutator
- shared mutator.
-
FluentTestRunnerAdapter
public FluentTestRunnerAdapter(FluentControlContainer driverContainer, SharedMutator sharedMutator)
Creates a test runner adapter, with a customer driver container and a customer shared mutator.- Parameters:
driverContainer
- driver containersharedMutator
- shared mutator
-
FluentTestRunnerAdapter
public FluentTestRunnerAdapter(FluentControlContainer driverContainer, java.lang.Class clazz, SharedMutator sharedMutator)
Creates a test runner adapter, with a customer driver container and a customer shared mutator. It is possible to pass class from which the FluentConfiguration annotation will be loaded.- Parameters:
driverContainer
- driver containerclazz
- class from which FluentConfiguration annotation will be loadedsharedMutator
- shared mutator
-
-
Method Detail
-
afterClass
public static void afterClass(java.lang.Class<?> testClass)
Invoked when a test class has finished (whatever the success of failing status)- Parameters:
testClass
- test class to terminate
-
starting
protected void starting()
Invoked when a test method is starting.
-
starting
protected void starting(java.lang.String testName)
Invoked when a test method is starting.- Parameters:
testName
- Test name
-
starting
protected void starting(java.lang.Class<?> testClass)
Invoked when a test method is starting.- Parameters:
testClass
- Test class
-
starting
protected void starting(java.lang.Class<?> testClass, java.lang.String testName)
Invoked when a test method is starting.- Parameters:
testClass
- Test classtestName
- Test name
-
getSharedWebDriver
protected SharedWebDriver getSharedWebDriver(SharedMutator.EffectiveParameters<?> parameters, java.util.concurrent.ExecutorService webDriverExecutor) throws java.util.concurrent.ExecutionException, java.lang.InterruptedException
Returns SharedDriver instance- Parameters:
parameters
- driver parameterswebDriverExecutor
- executor service- Returns:
- SharedDriver
- Throws:
java.util.concurrent.ExecutionException
- execution exceptionjava.lang.InterruptedException
- interrupted exception
-
finished
protected void finished()
Invoked when a test method has finished (whatever the success of failing status)
-
finished
protected void finished(java.lang.String testName)
Invoked when a test method has finished (whatever the success of failing status)- Parameters:
testName
- Test name
-
finished
protected void finished(java.lang.Class<?> testClass)
Invoked when a test method has finished (whatever the success of failing status)- Parameters:
testClass
- Test class
-
finished
protected void finished(java.lang.Class<?> testClass, java.lang.String testName)
Invoked when a test method has finished (whatever the success of failing status)- Parameters:
testClass
- Test classtestName
- Test name
-
failed
protected void failed()
Invoked when a test method has failed (before finished)
-
failed
protected void failed(java.lang.String testName)
Invoked when a test method has failed (before finished)- Parameters:
testName
- Test name
-
failed
protected void failed(java.lang.Class<?> testClass)
Invoked when a test method has failed (before finished)- Parameters:
testClass
- Test class
-
failed
protected void failed(java.lang.Class<?> testClass, java.lang.String testName)
Invoked when a test method has failed (before finished)- Parameters:
testClass
- Test classtestName
- Test name
-
failed
protected void failed(java.lang.Throwable e, java.lang.Class<?> testClass, java.lang.String testName)
Invoked when a test method has failed (before finished)- Parameters:
e
- Throwable thrown by the failing test.testClass
- Test classtestName
- Test name
-
-