CucumberruntimejunitUndefinedThrowable The step is undefined | Selenium Forum
S
Stuti Gawande Posted on 05/01/2019

Hi,

I am getting above error while executing my runner class, I have defined correct path, still getting this error.

You can implement missing steps with the snippets below:

@Given("I open Firefox")
public void i_open_Firefox() {
// Write code here that turns the phrase above into concrete actions
throw new PendingException();
}

@Given("I navigate to loginURL")
public void i_navigate_to_loginURL() {
// Write code here that turns the phrase above into concrete actions
throw new PendingException();
}

 

Please let me know , where I making mistake.

 

Regards,

Stuti Gawande


A
Ashish Thakur Replied on 06/01/2019

How are you running this?


S
Stuti Gawande Replied on 06/01/2019

Hi,

This is my runner class:

package Runner;

import org.junit.runner.RunWith;


import cucumber.api.CucumberOptions;
import cucumber.api.junit.Cucumber;


@RunWith(Cucumber.class)
@CucumberOptions(
dryRun=false,
strict=false,
monochrome=false,
features={"src/test/java/resources"},
glue={"/prettysixyards/src/test/java/StepDefinition/"},
plugin={
"html:target/site/cucumber-html",
"json:target/cucumber1.json"}
)
public class Runner {


}

 

And below is my project structure:

Responsive image


A
Ashish Thakur Replied on 09/01/2019

Zip and post your project


S
Stuti Gawande Replied on 10/01/2019

Hi,

Please find below attached zip folder.

Regards,

Stuti Gawande


A
Ashish Thakur Replied on 12/02/2019

Hi Stuti, 

 

We're looking into the issue and will update you shortly.


A
Ashish Thakur Replied on 12/02/2019

Hi Stuti,

I looked into your project and found two issues with your project. They are listed as follows:

1. You missed adding selenium dependency to the poi.xml

2. You have not added JUnit library as well.

Please correct these issues and inform us if you're still facing the same issue.