Which class sends the value of Testcontext object for the first time to the step definition classes in a Cucumber BDD project?

I am trying to convert an existing Cucumber project to Serenity Cucumber project without changing the basic folder structure similar to the one described in http://toolsqa.com/selenium-cucumber-framework/sharing-test-context-between-cucumber-step-definitions/. 

 

I am facing the issue with Serenity that I have add an empty constructor in the stepdefinition classes, hence unable to use the following constructor:

public Hooks (TestContext context) {
testContext = context;
}

To overcome the issue, I wanted to know how to get the ‘context’ value , could you please help?

 

Default Asked on May 9, 2018 in Selenium WebDriver.
Add Comment
  • 0 Answer(s)
  • Your Answer

    By posting your answer, you agree to the privacy policy and terms of service.