Package io.fluentlenium.adapter
Class FluentTestRunnerAdapter
java.lang.Object
io.fluentlenium.core.FluentControlImpl
io.fluentlenium.adapter.FluentAdapter
io.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
FluentLenium Test Runner Adapter.
Extends this class to provide FluentLenium support to your Test class.
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.fluentlenium.configuration.ConfigurationProperties
ConfigurationProperties.DriverLifecycle, ConfigurationProperties.TriggerMode -
Constructor Summary
ConstructorsConstructorDescriptionCreates a new test runner adapter.FluentTestRunnerAdapter(FluentControlContainer driverContainer) Creates a test runner adapter, with a custom driver container.FluentTestRunnerAdapter(FluentControlContainer driverContainer, SharedMutator sharedMutator) Creates a test runner adapter, with a customer driver container and a customer shared mutator.FluentTestRunnerAdapter(FluentControlContainer driverContainer, Class<?> clazz, 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
Modifier and TypeMethodDescriptionstatic voidclassDriverCleanup(Class<?> testClass) Invoked when a test class has finished (whatever the success of failing status)protected voidfailed()Invoked when a test method has failed (before finished)protected voidInvoked when a test method has failed (before finished)protected voidInvoked when a test method has failed (before finished)protected voidInvoked when a test method has failed (before finished)protected voidInvoked when a test method has failed (before finished)protected voidfinished()Invoked when a test method has finished (whatever the success of failing status)protected voidInvoked when a test method has finished (whatever the success of failing status)protected voidInvoked when a test method has finished (whatever the success of failing status)protected voidInvoked when a test method has finished (whatever the success of failing status)<T extends Annotation>
TgetClassAnnotation(Class<T> annotation) Allows to access Class level annotation of currently running test<T extends Annotation>
TgetMethodAnnotation(Class<T> annotation) Allows to access method level annotation of currently running testClass<?>protected voidstarting()Invoked when a test method is starting.protected voidInvoked when a test method is starting.protected voidInvoked when a test method is starting.protected voidInvoked when a test method is starting.Methods inherited from class io.fluentlenium.adapter.FluentAdapter
getDriver, getFluentControlMethods inherited from class io.fluentlenium.core.FluentControlImpl
getConfiguration, getControlContainerMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.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, windowMethods inherited from interface io.fluentlenium.adapter.IFluentAdapter
initFluent, initFluent, isFluentControlAvailable, newWebDriver, releaseFluent, setFluentControl
-
Constructor Details
-
FluentTestRunnerAdapter
public FluentTestRunnerAdapter()Creates a new test runner adapter. -
FluentTestRunnerAdapter
Creates a test runner adapter, with a custom driver container.- Parameters:
driverContainer- driver container
-
-
Method Details
-
getTestClass
- Specified by:
getTestClassin interfaceTestRunnerAdapter- Returns:
- Class of currently running test
-
getTestMethodName
- Specified by:
getTestMethodNamein interfaceTestRunnerAdapter- Returns:
- method name (as String) of currently running test
-
getClassAnnotation
Description copied from interface:TestRunnerAdapterAllows to access Class level annotation of currently running test- Specified by:
getClassAnnotationin interfaceTestRunnerAdapter- Type Parameters:
T- the class annotation- Parameters:
annotation- interface you want to access- Returns:
- Annotation instance
-
getMethodAnnotation
Description copied from interface:TestRunnerAdapterAllows to access method level annotation of currently running test- Specified by:
getMethodAnnotationin 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
Invoked when a test method is starting.- Parameters:
testName- Test name
-
starting
Invoked when a test method is starting.- Parameters:
testClass- Test class
-
starting
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
Invoked when a test method has finished (whatever the success of failing status)- Parameters:
testName- Test name
-
finished
Invoked when a test method has finished (whatever the success of failing status)- Parameters:
testClass- Test class
-
finished
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
Invoked when a test method has failed (before finished)- Parameters:
testName- Test name
-
failed
Invoked when a test method has failed (before finished)- Parameters:
testClass- Test class
-
failed
Invoked when a test method has failed (before finished)- Parameters:
testClass- Test classtestName- Test name
-
failed
Invoked when a test method has failed (before finished)- Parameters:
e- Throwable thrown by the failing test.testClass- Test classtestName- Test name
-
classDriverCleanup
Invoked when a test class has finished (whatever the success of failing status)- Parameters:
testClass- test class to terminate
-