Hi all,

I have a scenario:

Given a user open homepage
Then should see <message1>
When user do something and go to another page
Then should see <message2>
Examples:
test.table


And test.table with content:
|message1|message2|
|Welcome|Hello|

And step "Then should see <message1>" and "Then should see <message2>" do the 
same thing: just check the text.
So I just want to implement it once time.
Code like:
@Then("should see <message>")
public void shouldSeeMsg(@Named("message")String message)
{
    // check text...
}

When running this case, I hope it can match both step "<message1>" and 
"<message2>".
But the problem is, I found the parameter name in code must be the same with 
the name specified in scenario.
These steps always in PENDING status.

Could anyone help to how to solve this?
Thanks very much.

Best Regards,
Ayesha

Reply via email to