selenium-cucumber/selenium-cucumber-java-maven-example

Unable to add new steps, any idea why? - undefined steps whatever I try

mickael28 opened this issue · 0 comments

I've created a new feature under /test/resources and added a new step there,eg:

  • And I enter the wrong number
    

Then I've put the implementation:
`@Given("^I enter the wrong council tax number$")

public void i_enter_the_wrong_council_tax_number() throws Throwable {
// Write code here that turns the phrase above into concrete actions
throw new PendingException();
}`

Inside the test/java/info.seleniumcucumber.userStepDefintions/UserStepDefinitions file, and when I run the test I still get

`1 Scenarios (1 undefined)
3 Steps (1 undefined, 2 passed)
0m9.609s

You can implement missing steps with the snippets below:

@given("^I enter the wrong council tax number$")

public void i_enter_the_wrong_council_tax_number() throws Throwable {
// Write code here that turns the phrase above into concrete actions
throw new PendingException();
}
`

I've tried creating a new package and putting it there:

  • package stepsdefinitions;

And then expanding the RunCukeTest file with:
` glue = {"info.seleniumcucumber.stepsdefinitions", // predefined step definitions package

"info.seleniumcucumber.userStepDefintions", // user step definitions package (NOTE it will contain a lot of classes)

"stepsdefinitions"
}`

But I keep on getting that undefined error, any clue what the failure could be?