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

public class FluentCucumberTest extends FluentTestRunnerAdapter
Cucumber FluentLenium Test Runner Adapter.

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.

  • Constructor Details

    • FluentCucumberTest

      public FluentCucumberTest()
      Initializes context for FluentCucumberTest and stores it in a FluentTestContainer to share state across Cucumber steps.
    • FluentCucumberTest

      protected FluentCucumberTest (FluentControlContainer container, Class clazz, SharedMutator sharedMutator)
      Constructor used within module. Creates a new FluentLenium cucumber test and points within FluentTestContainer.
      Parameters:
      container - driver container
      clazz - class from which FluentConfiguration annotation will be loaded
      sharedMutator - shared mutator
    • FluentCucumberTest

      protected FluentCucumberTest (FluentControlContainer container, SharedMutator sharedMutator)
      Constructor used within module. Creates a new FluentLenium cucumber test and points within FluentTestContainer.
      Parameters:
      container - driver container
      sharedMutator - shared mutator
  • 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