Class BaseStepListener

  • All Implemented Interfaces:
    StepListener, StepPublisher

    public class BaseStepListener
    extends Object
    implements StepListener, StepPublisher
    Observes the test run and stores test run details for later reporting. Observations are recorded in an TestOutcome object. This includes recording the names and results of each test, and taking and storing screenshots at strategic points during the tests.
    • Constructor Detail

      • BaseStepListener

        public BaseStepListener​(File outputDirectory)
      • BaseStepListener

        public BaseStepListener​(File outputDirectory,
                                com.google.inject.Injector injector)
      • BaseStepListener

        public BaseStepListener​(Class<? extends org.openqa.selenium.WebDriver> driverClass,
                                File outputDirectory)
        Create a step listener with a given web driver type.
        Parameters:
        driverClass - a driver of this type will be used
        outputDirectory - reports and screenshots are generated here
      • BaseStepListener

        public BaseStepListener​(Class<? extends org.openqa.selenium.WebDriver> driverClass,
                                File outputDirectory,
                                Configuration configuration)
      • BaseStepListener

        public BaseStepListener​(File outputDirectory,
                                WebdriverManager webdriverManager)
      • BaseStepListener

        public BaseStepListener​(File outputDirectory,
                                Pages pages)
        Create a step listener using the driver from a given page factory. If the pages factory is null, a new driver will be created based on the default system values.
        Parameters:
        outputDirectory - reports and screenshots are generated here
        pages - a pages factory.