Package io.cucumber.java
Class Step
java.lang.Object
io.cucumber.java.Step
Represents a step in a scenario. BeforeStep or AfterStep hooks that declare a
parameter of this type will receive an instance of this class providing
information about the step being executed.
Note: This class is not intended to be used to create reports. To create
custom reports use the io.cucumber.plugin.Plugin class. The plugin
system provides a much richer access to Cucumber than hooks could provide.
- See Also:
-
Method Details
-
getKeyword
Returns this step's keyword. I.e. Given, When, Then.- Returns:
- step keyword
-
getText
Returns this step's text.- Returns:
- this step's text
-
getLine
public int getLine()Line in the feature file this step is located in.- Returns:
- step line number
-