I'm trying to write step definitions with Serenity Cucumber BDD
This is my feature:
@test1
Scenario Outline: I need to try to Sign up as a new user
Given I have clicked on the Sign up link
When I enter <username> and <password>
And I click on sign up button
Then I must see Success message
Examples:
| username | password |
| user001 | test123 |
| user002 | test123 |
My step definition
@When(value = "I enter {word} and {word}")
public void iAddUserNameAndPassword(String userName, String password) {
user.addNewUserInfo(userName, password);
How can I use "userName" and "password" instead of "word" in the step definition
I try to give the parameter definition shown below, but it doesn't work
@ParameterType("word") // regexp
public String userName(String userName){ // type, name (from method)
return new String(userName); // transformer function
}