【发布时间】:2019-02-18 14:30:51
【问题描述】:
我正在尝试在 Intellij 中用 Java 设置 Selenium + Cucumber 项目(我是 Java 初学者)。这是我使用 Cucumber JUnit 跑步者的课程:
package runtest;
import cucumber.api.CucumberOptions;
import cucumber.api.junit.Cucumber;
import org.junit.runner.RunWith;
@RunWith(Cucumber.class)
@CucumberOptions (
features = "C:\\Users\\my-feature.feature",
)
public class RunTest {
}
我收到以下错误:
Error:(8, 1) java: annotation @org.junit.runner.RunWith is missing default values for elements annotationType,<init>
Error:(8, 2) java: org.junit.runner.RunWith is not an annotation type
我不知道如何解决这个问题或发生了什么。请帮忙。
【问题讨论】:
-
你在用
pom.xml -
不,我没有使用它。
标签: selenium intellij-idea junit cucumber cucumber-junit