Forum Discussion

Dinesh_Nehru's avatar
Occasional Visitor
2 years ago

Step package is not import in my cucumber junit project

<p>Hi Connections,

I'm currently working with cucumber Junit framework in the mobile application testing 

we were connecting the real device with the appium server and running the script i have implemented the Extent report in the project 

for the i want to generate dynamic created test @BEFORE hooks 

when i try to below methods i'm getting error to import the Step package 



public void setUp(Scenario scenario) {

test = extent.createTest(scenario.getName());

for (Step step : scenario.getSteps()) {

Node stepNode = test.createNode(step.getKeyword() + " " + step.getName());

if (step.getResult().getStatus().equals(Status.FAILED)) {"Step Failed: " + step.getKeyword() + " " + step.getName());

} else {

stepNode.pass("Step Passed: " + step.getKeyword() + " " + step.getName());

} } }

when i try to import this "import cucumber.api.java8.Step;" (or) "import;" this packages i'm getting error to import it 
I also tried to do this too  "import*;"

currently I'm using following versions 

my cucumber-Java version is 7.11.0 and cucumber-Junit version is 7.11.0 and cucumber-Gherkin version is 7.9.0 and cucumber-reporting version is 5.7.4 and the selenium-Java version is 4.8.0

updated in the POM.xml file too 

can any one help me out with this <p>

No RepliesBe the first to reply