Reputation: 37
I have to pass "#" symbol as parameter in feature file. How to achieve that as # symbol represents comments in feature file
Upvotes: 0
Views: 686
Reputation: 585
If you are using cucumber version 4.x.x or above you can use (.*) regular expression in step definition to take any kind of parameters.
Sample Feature File:
Scenario: User searches for a character in Search
When The user searches for # in the Search
Sample Step Definition:
@When("The user searches for (.*) in the Search")
Upvotes: 1