2017-01-30 8 views
0

В inteliji я попытался выполнить шаги из файла огурца.Не удается разрешить символ 'java'

import cucumber.api.PendingException; 

public class LoginStep { 
    @cucumber.api.java.en.Then("^I should see userform page$") 
    public void iShouldSeeUserformPage() throws Throwable { 

     throw new PendingException(); 
    } 
} 

В строке @cucumber.api.java.en.Then он жалуется

Cannot resolve symbol 'java' 

Вот мой pom.xml:

<dependencies> 
     <!-- https://mvnrepository.com/artifact/info.cukes/cucumber-junit --> 
     <dependency> 
      <groupId>info.cukes</groupId> 
      <artifactId>cucumber-junit</artifactId> 
      <version>1.2.5</version> 
     </dependency> 

    </dependencies> 

Как я решить ее?

+2

Вы используете 'maven'? Добавили ли вы зависимость cucumber-java? – alayor

ответ

1

Ваш должен добавить cucumber-java зависимости.

<dependencies> 
    <!-- https://mvnrepository.com/artifact/info.cukes/cucumber-junit --> 
    <dependency> 
     <groupId>info.cukes</groupId> 
     <artifactId>cucumber-java</artifactId> 
      <version>1.2.5</version> 
    </dependency> 
</dependencies>