Forum Discussion

muhilr's avatar
muhilr
Occasional Visitor
5 years ago
Solved

Multiple Step Definition match - feasibility of specifying priority

Hello All, I am using Cucumber-Java, I have a special use case that requires some help from you.
I have a generic step definition method that matches any step. Is there a way to tell Cucumber to look for exact match first if not use the generic step definition ?
 
Thanks
muhi

1 Reply

  • If Cucumber finds two or more matching step definitions, it will throw an error saying it's ambiguous. For this reason you should never use step definitions that matches anything, because you will always get ambiguous errors.