无法解析符号'java'

时间:2017-01-30 19:48:39

标签: java cucumber

在inteliji中,我试图用小黄瓜文件制作步骤。

 <script type="text/javascript" src="~/Scripts/jquery-1.10.2.min.js"></script>




    <script type="text/javascript">
        $(document).ready(function () {

            $("#Town").change(function () {
                debugger;
                var url = url("GetSurburbs", "Account");
                $.post(url,{id : $("#Town").val()}).done(function(data){
                    alert('Success');
                }).fail(function(data){
                    alert('failed');
                });
            })
        })

    </script>

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

我该如何解决?

1 个答案:

答案 0 :(得分: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>