Cucumber Cumber无法识别实现的方法
请让我知道如何进一步进行或需要做哪些更改。 黄瓜版本:1.2.5Cucumber Cumber无法识别实现的方法,cucumber,Cucumber,请让我知道如何进一步进行或需要做哪些更改。 黄瓜版本:1.2.5 Selenium:2.53用双引号括起和--“…是的,它成功了。。非常感谢:) Feature: Title of your feature Scenario Outline: Login to the application Given Application is launched When I check for the <username> in step When I verif
Selenium:2.53用双引号括起和--“…是的,它成功了。。非常感谢:)
Feature: Title of your feature
Scenario Outline: Login to the application
Given Application is launched
When I check for the <username> in step
When I verify the <password> in step
Then I login to the application
Examples:
| username | password |
| admin | Admin123 |
@When("^I check for the \"([^\"]*)\" in step$")
public void i_check_for_the_admin_in_step(String arg1) throws Throwable {
driver.findElement(By.id("username")).sendKeys(arg1);
}
@When("^I verify the \"([^\"]*)\" in step$")
public void i_verify_the_Admin_in_step(String arg2) throws Throwable {
driver.findElement(By.id("password")).sendKeys(arg2);
}
Error in consoles on running the code :
@When("^I check for the admin in step$")
public void i_check_for_the_admin_in_step() throws Throwable {
// Write code here that turns the phrase above into concrete actions
throw new PendingException();
}
@When("^I verify the Admin(\\d+) in step$")
public void i_verify_the_Admin_in_step(int arg1) throws Throwable {
// Write code here that turns the phrase above into concrete actions
throw new PendingException();
}