【发布时间】:2019-04-26 00:47:41
【问题描述】:
当我运行 MainRunner 类作为响应时,我在控制台中收到如下错误消息。我确实为文件夹设置了权限。
这是我的步骤类:
package CucumberFramework.steps;
import cucumber.api.java.en.Given;
import cucumber.api.java.en.Then;
import cucumber.api.java.en.When;
public class LoginSteps {
@Given("^User navigate to stackoverflow webstie$")
public void user_navigate_to_stackoverflow_webstie() throws Throwable {
System.out.println("user_navigate_to_stackoverflow_webstie");
}
@Given("^User clicks on the login button$")
public void user_clicks_on_the_login_button() throws Throwable {
System.out.println("user_clicks_on_the_login_button");
}
@Given("^User enters valid username$")
public void user_enters_valid_username() throws Throwable {
System.out.println("user_enters_valid_username");
}
@Given("^User enters valid password$")
public void user_enters_valid_password() throws Throwable {
System.out.println("user_enters_valid_password");
}
@When("^User clicks again on the login button$")
public void user_clicks_again_on_the_login_button() throws Throwable {
System.out.println("user_clicks_again_on_the_login_button");
}
@Then("^User should be taken to the sucsfull login page$")
public void user_should_be_taken_to_the_sucsfull_login_page() throws Throwable {
System.out.println("user_should_be_taken_to_the_sucsfull_login_page");
}
@Given("^User navigate to stackoverflow webstie(\\d+)$")
public void user_navigate_to_stackoverflow_webstie2(int arg1) throws Throwable {
System.out.println("user_navigate_to_stackoverflow_webstie2");
}
@Given("^User clicks on the login button(\\d+)$")
public void user_clicks_on_the_login_button2(int arg1) throws Throwable {
System.out.println("user_clicks_on_the_login_button2");
}
@Given("^User enters valid username(\\d+)$")
public void user_enters_valid_username2(int arg1) throws Throwable {
System.out.println("user_enters_valid_username2");
}
@Given("^User enters valid password(\\d+)$")
public void user_enters_valid_password2(int arg1) throws Throwable {
System.out.println("user_enters_valid_password2");
}
@When("^User clicks again on the login button(\\d+)$")
public void user_clicks_again_on_the_login_button2(int arg1) throws Throwable {
System.out.println("user_clicks_again_on_the_login_button2");
}
@Then("^User should be taken to the sucsfull login page(\\d+)$")
public void user_should_be_taken_to_the_sucsfull_login_page2(int arg1) throws Throwable {
System.out.println("user_should_be_taken_to_the_sucsfull_login_page2");
}
}
我还查看了目标文件夹的权限,并确保为所有用户授予权限。我使用的是 Windows 10 专业版。我也尝试在管理员模式下运行 Eclipse,但也没有用。
这是我的 Pom.xml https://pastebin.com/ad2qyGRH
我也尝试了以下方法:
正在运行:Eclipse 菜单 Project > Clean...
但没有快乐。请问有谁知道是什么原因造成的?
亲切的问候
【问题讨论】:
-
您能检查一下
target/cucumber不是文件吗?
标签: eclipse cucumber pom.xml file-permissions