Solved
Forum Discussion
Here's an example,
The result,
Here, you are checking if the feature name equals the scenario name, which will always be false.
if (scenarioName.indexOf(feature.Name) >= 0)
Thank you for the example rraghvani
The scenario Name is the same as the feature name that I provided.
Here are the names of the Feature and Scenario that I am trying to execute.
Did you write the AfterFeature code in the same file where you wrote the steps definition?
I am using different script files for AfterFeature and for the step definition of my scenario.