Skip to content
Advertisement

How to link setpDefication and feature file in cucumber is not working

I’m new to Cucumber jJava and had this problem in the initial stages. I’m using the MAVEN project.

I have created a feature file, stepDefination file, and Test Runner file. In the feature file, I have mentioned some scenarios and step definition files, write Selenium Java code, and the last TestRunner class I have created and mentioned codes.

enter image description here

Advertisement

Answer

Check what Given, When, Then annotations you are using, whether it matches the correct cucumber version and library or not. According to your attached screenshot, your Given, When, Then annotations should be from the cucumber.api package and not from the io.cucumber package.

User contributions licensed under: CC BY-SA
3 People found this is helpful
Advertisement