Class GenericActions<T extends AnyScenarioType,SELF extends GenericActions<T,SELF>>
- java.lang.Object
-
- com.tngtech.jgiven.base.StageBase<SELF>
-
- com.tngtech.jgiven.Stage<SELF>
-
- dev.aherscu.qa.jgiven.commons.utils.StageEx<SELF>
-
- dev.aherscu.qa.jgiven.commons.steps.GenericActions<T,SELF>
-
- Type Parameters:
SELF
- the type of the subclassT
- type of scenario
- All Implemented Interfaces:
ScenarioType<T>
@ThreadSafe public class GenericActions<T extends AnyScenarioType,SELF extends GenericActions<T,SELF>> extends StageEx<SELF> implements ScenarioType<T>
Generic actions.- Author:
- aherscu
-
-
Field Summary
-
Fields inherited from class dev.aherscu.qa.jgiven.commons.utils.StageEx
assertElementTimer, ATTACHEMENT_TRANSFORMER, clickTimer, currentStep, locateTimer, pollDelay, pollTimeout, retryPolicy, scrollIntoViewTimer, sendKeysTimer
-
-
Constructor Summary
Constructors Constructor Description GenericActions()
Logs the construction of this stage.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description SELF
comment(String comment)
Deprecated.useScenarioTestBase.section(String)
SELF
concatenate_$_files_from_$_into(org.apache.commons.io.filefilter.IOFileFilter fileFilter, File sourceDirectory, File targetFile)
Concatenates all files in specified source directory recursing into sub-directories.SELF
deleting_directory(File directory)
Deletes directory from specified path.SELF
doing_nothing()
Does nothing.SELF
doing_nothing(long millis)
Does nothing for specified duration.SELF
doing_nothing(Duration duration)
Does nothing for specified duration.SELF
failing_on_purpose_with(Throwable throwable)
Failing with specified throwable for self-testing purposes.SELF
retrying(StepWithDescription<SELF> step)
Retries specified step according to pre-configuredStageEx.retryPolicy
.SELF
retrying(Function<SELF,SELF> step)
Retries specified step according to pre-configuredStageEx.retryPolicy
.SELF
safely(StepWithDescription<SELF> step)
Safely executes specified step, swallowing all exceptions.SELF
safely(Function<SELF,SELF> step)
Safely executes specified step, swallowing all exceptions.-
Methods inherited from class dev.aherscu.qa.jgiven.commons.utils.StageEx
alert, attach, attachScreenshot, attachScreenshot, attachScreenshot, beforeScenarioConfigurePolling, context, element, elements, ensureElements, retry, safely, scrollIntoView
-
-
-
-
Method Detail
-
comment
@Deprecated public SELF comment(String comment)
Deprecated.useScenarioTestBase.section(String)
Comment to be reported.- Overrides:
comment
in classcom.tngtech.jgiven.Stage<SELF extends GenericActions<T,SELF>>
- Parameters:
comment
- comment to be added to generated report- Returns:
StageBase.self()
-
concatenate_$_files_from_$_into
public SELF concatenate_$_files_from_$_into(org.apache.commons.io.filefilter.IOFileFilter fileFilter, File sourceDirectory, File targetFile)
Concatenates all files in specified source directory recursing into sub-directories.- Parameters:
fileFilter
- a file filtersourceDirectory
- the source directorytargetFile
- the target file into which to concatenate- Returns:
StageBase.self()
-
deleting_directory
public SELF deleting_directory(File directory)
Deletes directory from specified path.- Parameters:
directory
- the directory path- Returns:
StageBase.self()
-
doing_nothing
public SELF doing_nothing()
Does nothing.- Returns:
StageBase.self()
-
doing_nothing
public SELF doing_nothing(long millis)
Does nothing for specified duration.- Parameters:
millis
- how many milliseconds to do nothing- Returns:
StageBase.self()
-
doing_nothing
@NestedSteps public SELF doing_nothing(Duration duration)
Does nothing for specified duration.- Parameters:
duration
- the duration to do nothing- Returns:
StageBase.self()
-
failing_on_purpose_with
public SELF failing_on_purpose_with(Throwable throwable)
Failing with specified throwable for self-testing purposes.- Parameters:
throwable
- the throwable- Returns:
StageBase.self()
-
retrying
public final SELF retrying(Function<SELF,SELF> step)
Retries specified step according to pre-configuredStageEx.retryPolicy
.- Parameters:
step
- the step to retry- Returns:
StageBase.self()
- See Also:
StageEx.beforeScenarioConfigurePolling()
-
retrying
public final SELF retrying(StepWithDescription<SELF> step)
Retries specified step according to pre-configuredStageEx.retryPolicy
.- Parameters:
step
- the step to retry- Returns:
StageBase.self()
- See Also:
StageEx.beforeScenarioConfigurePolling()
-
safely
@Hidden public final SELF safely(Function<SELF,SELF> step)
Safely executes specified step, swallowing all exceptions.IMPORTANT:must not be called from step method that is annotated with
NestedSteps
since this interferes with exception handling.- Parameters:
step
- the step to execute- Returns:
StageBase.self()
-
safely
@Hidden public final SELF safely(StepWithDescription<SELF> step)
Safely executes specified step, swallowing all exceptions.IMPORTANT:must not be called from step method that is annotated with
NestedSteps
since this interferes with exception handling.- Parameters:
step
- the step to execute- Returns:
StageBase.self()
-
-