Package org.fluentlenium.adapter
Class FluentTestRunnerAdapter
- java.lang.Object
-
- org.fluentlenium.core.FluentControlImpl
-
- org.fluentlenium.adapter.FluentAdapter
-
- org.fluentlenium.adapter.FluentTestRunnerAdapter
-
- All Implemented Interfaces:
IFluentAdapter
,TestRunnerAdapter
,Configuration
,ConfigurationMutator
,ConfigurationProperties
,InputControl
,AlertControl
,CapabilitiesControl
,ComponentInstantiator
,CssControl
,EventsControl
,FluentControl
,FluentInjectControl
,NavigationControl
,PerformanceTimingControl
,JavascriptControl
,SearchControl<FluentWebElement>
,SeleniumDriverControl
,SnapshotControl
,AwaitControl
,ChromiumControl
public class FluentTestRunnerAdapter extends FluentAdapter implements TestRunnerAdapter
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
classDriverCleanup(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)<T extends java.lang.annotation.Annotation>
TgetClassAnnotation(java.lang.Class<T> annotation)
Allows to access Class level annotation of currently running test<T extends java.lang.annotation.Annotation>
TgetMethodAnnotation(java.lang.Class<T> annotation)
Allows to access method level annotation of currently running testjava.lang.Class<?>
getTestClass()
java.lang.String
getTestMethodName()
protected 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
-
Methods inherited from class org.fluentlenium.core.FluentControlImpl
getConfiguration, getControlContainer
-
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.FluentControl
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, getAppiumDriver, getAwaitAtMost, getAwaitPollingEvery, getBaseUrl, getBrowserTimeout, getBrowserTimeoutRetries, getCapabilities, getChromiumApi, 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, performanceTiming, 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 interface org.fluentlenium.adapter.IFluentAdapter
initFluent, isFluentControlAvailable, newWebDriver, releaseFluent, setFluentControl
-
-
-
-
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
-
getTestClass
public java.lang.Class<?> getTestClass()
- Specified by:
getTestClass
in interfaceTestRunnerAdapter
- Returns:
- Class of currently running test
-
getTestMethodName
public java.lang.String getTestMethodName()
- Specified by:
getTestMethodName
in interfaceTestRunnerAdapter
- Returns:
- method name (as String) of currently running test
-
getClassAnnotation
public <T extends java.lang.annotation.Annotation> T getClassAnnotation(java.lang.Class<T> annotation)
Description copied from interface:TestRunnerAdapter
Allows to access Class level annotation of currently running test- Specified by:
getClassAnnotation
in interfaceTestRunnerAdapter
- Type Parameters:
T
- the class annotation- Parameters:
annotation
- interface you want to access- Returns:
- Annotation instance
-
getMethodAnnotation
public <T extends java.lang.annotation.Annotation> T getMethodAnnotation(java.lang.Class<T> annotation)
Description copied from interface:TestRunnerAdapter
Allows to access method level annotation of currently running test- Specified by:
getMethodAnnotation
in interfaceTestRunnerAdapter
- Type Parameters:
T
- the method annotation- Parameters:
annotation
- interface you want to access- Returns:
- Annotation instance
-
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
-
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
-
classDriverCleanup
public static void classDriverCleanup(java.lang.Class<?> testClass)
Invoked when a test class has finished (whatever the success of failing status)- Parameters:
testClass
- test class to terminate
-
-