Closed UtsaChakraborty closed 6 years ago
Also I am getting , error "package net.thucydides.core.annotations does not exist" while using @Step annotations for Page object files.
A step definition file must have an empty constructor to work with Serenity.
@wakaleo , how to implement shared context then? This was common practice for such cases.
@Inject public StorePageSteps(TestContext context){ this.testContext = context; }
I was referring to https://github.com/serenity-bdd/serenity-cucumber/issues/102....but since the POM dependencies are updated , I am unable to understand the reason for the exception. PFB the stepdefinition class: package stepdefinitions;
import cucumber.TestContext; import cucumber.api.java.en.Given; import cucumber.api.java.en.Then; import cucumber.api.java.en.When; import net.thucydides.core.annotations.Steps; import pageobjects.StorePage;
import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertTrue;
public class StorePageSteps { @Steps TestContext testContext; StorePage storePage;
}