0

I have to pass "#" symbol as parameter in feature file. How to achieve that as # symbol represents comments in feature file

MVLS
  • 37
  • 3

1 Answers1

1

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")
Sooraj
  • 565
  • 3
  • 8