Cucumber and Selenium Error on Feature
<p>I created a automated test scenario using selenium + cucumber on java, and when I try to execute my test nothing occur. I don't know what I did worng but I think that something happend with my feature, because exist warning on the following messages "No definition found for <code>I try to login on facebook</code>", "No definition found for <code>I put my user "email"</code>", "No definition found for <code>I put my password "pass"</code>" and "No definition found for <code>validate login</code>".</p>

<p>I imported these jars using maven: cucumber-java : 1.2.5/cucumber-junit : 1.2.5/selenium-java : 3.0.1/selenium-firefox-driver : 3.0.1/junit : 4.12 </p>

<p>RunTest.java</p>

<pre><code>package com.tdd.facebook;   

import org.junit.runner.RunWith; 

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

@RunWith(Cucumber.class) 
@CucumberOptions(
        format = {"pretty", "html:target/cucumber"},
        features = {"src/test/resources"}
        ) 

public class RunTest {

    public RunTest() {
        // TODO Auto-generated constructor stub
    }

}
</code></pre>

<p>LoginSteps.java</p>

<pre><code>package com.tdd.facebook;

import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.firefox.FirefoxDriver;

import cucumber.api.PendingException;
import cucumber.api.java.en.Given;
import cucumber.api.java.en.Then;
import cucumber.api.java.en.When;

public class LoginSteps {

    WebDriver driver = null;

    @Given("^I try to login on facebook$")
    public void i_try_to_login_on_facebook() throws Throwable {

        System.setProperty("webdriver.gecko.driver", "C:\\Caio\\Selenium\\geckodriver.exe");
        WebDriver driver = new FirefoxDriver();
        driver.get("https://www.facebook.com/");        
        throw new PendingException();
    }

    @When("^I put my user \"([^\"]*)\"$")
    public void i_put_my_user(String email) {
        driver.findElement(By.id(email)).click();
        driver.findElement(By.id(email)).sendKeys("UserTest");
    }

    @When("^I put my password \"([^\"]*)\"$")
    public void i_put_my_password(String pass){ 
        driver.findElement(By.id(pass)).click();
        driver.findElement(By.id(pass)).sendKeys("Test");
    }

    @Then("^validate login$")
    public void validate_login() throws Throwable {
        System.out.println("Login OK");
    }

    public LoginSteps() {
        // TODO Auto-generated constructor stub
    }

}
</code></pre>

<p>Login.feature</p>

<pre><code>Feature: Login on facebook

Scenario: Check if the login is successful
Given I try to login on facebook
When I put my user "email"
When I put my password "pass"
Then validate login
</code></pre>

<p>pow.xml</p>

<pre><code>&lt;project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"&gt;
    &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;

    &lt;groupId&gt;com.tdd&lt;/groupId&gt;
    &lt;artifactId&gt;facebook&lt;/artifactId&gt;
    &lt;version&gt;0.0.1-SNAPSHOT&lt;/version&gt;
    &lt;packaging&gt;jar&lt;/packaging&gt;

    &lt;name&gt;facebook&lt;/name&gt;
    &lt;url&gt;http://maven.apache.org&lt;/url&gt;

    &lt;properties&gt;
      &lt;project.build.sourceEncoding&gt;UTF-8&lt;/project.build.sourceEncoding&gt;
    &lt;/properties&gt;

    &lt;dependencies&gt;
        &lt;dependency&gt;
            &lt;groupId&gt;info.cukes&lt;/groupId&gt;
            &lt;artifactId&gt;cucumber-java&lt;/artifactId&gt;
            &lt;version&gt;1.2.5&lt;/version&gt;
        &lt;/dependency&gt;
        &lt;dependency&gt;
            &lt;groupId&gt;info.cukes&lt;/groupId&gt;
            &lt;artifactId&gt;cucumber-junit&lt;/artifactId&gt;
            &lt;version&gt;1.2.5&lt;/version&gt;
        &lt;/dependency&gt;
        &lt;dependency&gt;
            &lt;groupId&gt;org.seleniumhq.selenium&lt;/groupId&gt;
            &lt;artifactId&gt;selenium-java&lt;/artifactId&gt;
            &lt;version&gt;3.0.1&lt;/version&gt;
        &lt;/dependency&gt;
        &lt;dependency&gt;
            &lt;groupId&gt;org.seleniumhq.selenium&lt;/groupId&gt;
            &lt;artifactId&gt;selenium-firefox-driver&lt;/artifactId&gt;
            &lt;version&gt;3.0.1&lt;/version&gt;
        &lt;/dependency&gt;
        &lt;dependency&gt;
            &lt;groupId&gt;junit&lt;/groupId&gt;
            &lt;artifactId&gt;junit&lt;/artifactId&gt;
            &lt;version&gt;4.12&lt;/version&gt;
        &lt;/dependency&gt;
    &lt;/dependencies&gt;
&lt;/project&gt;
</code></pre>