Class FluentCucumberTest
- 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
Extend this class to provide FluentLenium support to your Cucumber Test class. It can be each individual step definitions class, or a base step defs class which is then further extended.
This class should also be extended by the class that is for defining the Cucumber Before and After hooks.
See Cucumber Test Runner documentation for additional examples.
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.fluentlenium.configuration.ConfigurationProperties
ConfigurationProperties.DriverLifecycle, ConfigurationProperties.TriggerMode
-
Constructor Summary
ModifierConstructorDescriptionInitializes context forFluentCucumberTest
and stores it in aFluentTestContainer
to share state across Cucumber steps.protected
FluentCucumberTest
(FluentControlContainer container, Class clazz, SharedMutator sharedMutator) Constructor used within module.protected
FluentCucumberTest
(FluentControlContainer container, SharedMutator sharedMutator) Constructor used within module. -
Method Summary
Modifier and TypeMethodDescriptionvoid
after
(io.cucumber.java.Scenario scenario) Stops this adapter, and marks the provided scenario as finished, and also as failed, if necessary, according to its status.void
before
(io.cucumber.java.Scenario scenario) Initializes this adapter with the provided Scenario.Methods inherited from class io.fluentlenium.adapter.FluentTestRunnerAdapter
classDriverCleanup, failed, failed, failed, failed, failed, finished, finished, finished, finished, getClassAnnotation, getMethodAnnotation, getTestClass, getTestMethodName, starting, starting, starting, starting
Methods inherited from class io.fluentlenium.adapter.FluentAdapter
getDriver, getFluentControl
Methods inherited from class io.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 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, window
Methods inherited from interface io.fluentlenium.adapter.IFluentAdapter
initFluent, initFluent, isFluentControlAvailable, newWebDriver, releaseFluent, setFluentControl
-
Constructor Details
-
FluentCucumberTest
public FluentCucumberTest()Initializes context forFluentCucumberTest
and stores it in aFluentTestContainer
to share state across Cucumber steps.
-
-
Method Details
-
before
public void before(io.cucumber.java.Scenario scenario) Initializes this adapter with the provided Scenario.It also performs a Selenium version check to make sure a compatible version is used in the user's project.
- Parameters:
scenario
- Cucumber scenario
-
after
public void after(io.cucumber.java.Scenario scenario) Stops this adapter, and marks the provided scenario as finished, and also as failed, if necessary, according to its status.- Parameters:
scenario
- Cucumber scenario
-