Package net.thucydides.core.steps
Class StepFactory
java.lang.Object
net.thucydides.core.steps.StepFactory
Produces an instance of a set of requirement steps for use in the acceptance tests.
Requirement steps navigate through pages using a WebDriver driver.
-
Constructor Summary
ConstructorsConstructorDescriptionCreate a new step factory without webdriver support.StepFactory
(Pages pages) Create a new step factory. -
Method Summary
Modifier and TypeMethodDescriptionstatic StepFactory
<T> T
getNewCachedStepLibraryFor
(Class<T> scenarioStepsClass) <T> T
getNewStepLibraryFor
(Class<T> scenarioStepsClass) <T> T
getSharedStepLibraryFor
(Class<T> scenarioStepsClass) Returns a new ScenarioSteps instance, of the specified type.<T> T
getUniqueStepLibraryFor
(Class<T> scenarioStepsClass) <T> T
getUniqueStepLibraryFor
(Class<T> scenarioStepsClass, Object... parameters) <T> T
instantiateNewStepLibraryFor
(Class<T> scenarioStepsClass, boolean cacheNewInstance) Create a new instance of a class containing test steps.<T> T
instantiateNewStepLibraryFor
(Class<T> scenarioStepsClass, Interceptor interceptor, boolean useCache) Create a new instance of a class containing test steps using custom interceptors.static boolean
isAssignableFrom
(Object argument, Class<?> parameterType) void
reset()
void
usePageFactory
(Pages pages) usingPages
(Pages pages)
-
Constructor Details
-
StepFactory
Create a new step factory. All web-testing step factories need a Pages object, which is passed to ScenarioSteps objects when they are created. -
StepFactory
public StepFactory()Create a new step factory without webdriver support. This is to be used for non-webtest acceptance tests.
-
-
Method Details
-
getFactory
-
usingPages
-
getNewStepLibraryFor
-
getNewCachedStepLibraryFor
-
getUniqueStepLibraryFor
-
getUniqueStepLibraryFor
-
reset
public void reset() -
instantiateNewStepLibraryFor
Create a new instance of a class containing test steps. This method will instrument the class appropriately and inject any nested step libraries or other dependencies. -
instantiateNewStepLibraryFor
public <T> T instantiateNewStepLibraryFor(Class<T> scenarioStepsClass, Interceptor interceptor, boolean useCache) Create a new instance of a class containing test steps using custom interceptors. -
usePageFactory
-
isAssignableFrom
-