All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.jbehave.web.selenium.PerStoryWebDriverSteps Maven / Gradle / Ivy

The newest version!
package org.jbehave.web.selenium;

import org.jbehave.core.annotations.AfterStory;
import org.jbehave.core.annotations.BeforeStory;

/**
 * Steps implementation that can be used before and after lifecycle in
 * WebDriver-based stories. It provides annotated methods to initialise
 * WebDriver before each story and quit WebDriver after each story.
 * 
 * @author Paul Hammant
 */
public class PerStoryWebDriverSteps extends WebDriverSteps {

    public PerStoryWebDriverSteps(WebDriverProvider driverProvider) {
        super(driverProvider);
    }

    @BeforeStory
    public void beforeStory() throws Exception {
        driverProvider.initialize();
    }

    @AfterStory
    public void afterStory() throws Exception {
        driverProvider.end();
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy